From 38408294cca322ee60411d8b71968fdc1c6fb0d9 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sun, 19 Sep 2021 00:55:29 -0400 Subject: [PATCH] build terminal string parsing fix --- dist/engine.bundle.js | 2 +- src/Terminal/Parser.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index 69ce409df..25433d020 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -16,5 +16,5 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */r.PARSE_OPTIONS={ecmaVersion:5,locations:!0},r.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},r.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},r.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},r.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},r.STEP_ERROR={},r.SCOPE_REFERENCE={},r.VALUE_IN_DESCRIPTOR={},r.toStringCycles_=[],r.prototype.getErrorLineNumber=function(e){var t=this.sourceCode;if(null==e||null==e.start)return NaN;try{return((t=t.substring(0,e.start)).match(/\n/g)||[]).length+1-this.sourceCodeLineOffset}catch(e){return NaN}},r.prototype.getErrorLineNumberMessage=function(e){return isNaN(e)?" (Unknown line number)":e<=0?" (Error occurred in an imported function)":" (Line Number "+e+". This line number is probably incorrect if your script is importing any functions. This is being worked on)"},r.prototype.appendCode=function(e){var t=this.stateStack[0];if(!t||"Program"!==t.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof e&&(e=n.b(e,r.PARSE_OPTIONS)),!e||"Program"!==e.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(e,t.scope);for(var a,i=0;a=e.body[i];i++)t.node.body.push(a);t.done=!1},r.prototype.step=function(){var e=this.stateStack,t=e[e.length-1];if(!t)return!1;var a=t.node,n=a.type;if("Program"===n&&t.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[n](e,t,a)}catch(e){if(e!==r.STEP_ERROR)throw e}return i&&e.push(i),!!a.end||this.step()},r.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},r.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,r.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,r.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,r.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new r.Object(null),this.FUNCTION_PROTO=new r.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.initArray(e),this.initString(e),this.initBoolean(e),this.initNumber(e),this.initDate(e),this.initRegExp(e),this.initError(e),this.initMath(e),this.initJSON(e);var t=this,a=this.createNativeFunction((function(e){throw EvalError("Can't happen")}),!1);a.eval=!0,this.setProperty(e,"eval",a),this.setProperty(e,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(e,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(e,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(e,"isFinite",this.createNativeFunction(isFinite,!1));for(var n=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O && !callbackfn.call(T, O[k], k, O)) return false;","k++;","}","return true;","}","});","Object.defineProperty(Array.prototype, 'filter',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t) {","var val = t[i];","if (fun.call(thisArg, val, i, t)) res.push(val);","}","}","return res;","}","});","if (!Array.prototype.find) {","Object.defineProperty(Array.prototype, 'find', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return kValue;","}","k++;","}","return undefined;","},","configurable: true,","writable: true","});","}","if (!Array.prototype.findIndex) {","Object.defineProperty(Array.prototype, 'findIndex', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return k;","}","k++;","}","return -1;","},","configurable: true,","writable: true","});","}","Object.defineProperty(Array.prototype, 'forEach',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O) callback.call(T, O[k], k, O);","k++;","}","}","});","Object.defineProperty(Array.prototype, 'includes', {","value: function(searchElement, fromIndex) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","// 1. Let O be ? ToObject(this value).","var o = Object(this);",'// 2. Let len be ? ToLength(? Get(O, "length")).',"var len = o.length >>> 0;","// 3. If len is 0, return false.","if (len === 0) {","return false;","}","// 4. Let n be ? ToInteger(fromIndex).","// (If fromIndex is undefined, this step produces the value 0.)","var n = fromIndex | 0;","// 5. If n ≥ 0, then","// a. Let k be n.","// 6. Else n < 0,","// a. Let k be len + n.","// b. If k < 0, let k be 0.","var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","function sameValueZero(x, y) {","return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));","}","// 7. Repeat, while k < len","while (k < len) {","// a. Let elementK be the result of ? Get(O, ! ToString(k)).","// b. If SameValueZero(searchElement, elementK) is true, return true.","if (sameValueZero(o[k], searchElement)) {","return true;","}","// c. Increase k by 1. ","k++;","}","// 8. Return false","return false;","}","});","Object.defineProperty(Array.prototype, 'map',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') new TypeError;","var T, A, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","A = new Array(len);","k = 0;","while (k < len) {","if (k in O) A[k] = callback.call(T, O[k], k, O);","k++;","}","return A;","}","});","Object.defineProperty(Array.prototype, 'reduce',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var t = Object(this), len = t.length >>> 0, k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in t)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k++];","}","for (; k < len; k++) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'reduceRight',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var t = Object(this), len = t.length >>> 0, k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in t)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k--];","}","for (; k >= 0; k--) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'some',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t && fun.call(thisArg, t[i], i, t)) {","return true;","}","}","return false;","}","});","(function() {","var sort_ = Array.prototype.sort;","Array.prototype.sort = function(opt_comp) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp(this[j], this[j + 1]) > 0) {","var swap = this[j];","this[j] = this[j + 1];","this[j + 1] = swap;","changes++;","}","}","if (!changes) break;","}","return this;","};","})();","Object.defineProperty(Array.prototype, 'toLocaleString',","{configurable: true, writable: true, value:","function() {","var out = [];","for (var i = 0; i < this.length; i++) {","out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();","}","return out.join(',');","}","});","")},r.prototype.initString=function(e){var t,a=this;t=function(e){return e=String(e),a.calledWithNew()?(this.data=e,this):e},this.STRING=this.createNativeFunction(t,!0),this.setProperty(e,"String",this.STRING),this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),r.NONENUMERABLE_DESCRIPTOR);for(var n=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],i=0;i= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","if (!String.prototype.endsWith) {","String.prototype.endsWith = function(search, this_len) {","if (this_len === undefined || this_len > this.length) {","this_len = this.length;","}","return this.substring(this_len - search.length, this_len) === search;","};","}","if (!String.prototype.includes) {","String.prototype.includes = function(search, start) {","'use strict';","if (typeof start !== 'number') {","start = 0;","}"," ","if (start + search.length > this.length) {","return false;","} else {","return this.indexOf(search, start) !== -1;","}","};","}","if (!String.prototype.startsWith) {","String.prototype.startsWith = function(search, pos) {","return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;","};","}","")},r.prototype.initBoolean=function(e){var t,a=this;t=function(e){return e=Boolean(e),a.calledWithNew()?(this.data=e,this):e},this.BOOLEAN=this.createNativeFunction(t,!0),this.setProperty(e,"Boolean",this.BOOLEAN)},r.prototype.initNumber=function(e){var t,a=this;t=function(e){return e=Number(e),a.calledWithNew()?(this.data=e,this):e},this.NUMBER=this.createNativeFunction(t,!0),this.setProperty(e,"Number",this.NUMBER);for(var n=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],i=0;i>>0;return t===Number(e)?t:NaN},r.legalArrayIndex=function(e){var t=e>>>0;return String(t)===String(e)&&4294967295!==t?t:NaN},r.Value,r.Object=function(e){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=e},r.Object.prototype.proto=null,r.Object.prototype.isObject=!0,r.Object.prototype.class="Object",r.Object.prototype.data=null,r.Object.prototype.toString=function(){if("Array"===this.class){(n=r.toStringCycles_).push(this);try{for(var e=[],t=0;t0;i.pop()){var o=i[i.length-1];switch(o.node.type){case"TryStatement":return void(o.cv={type:e,value:t,label:a});case"CallExpression":case"NewExpression":if(e===r.Completion.RETURN)return void(o.value=t);if(e!==r.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(e===r.Completion.BREAK){if(a?o.labels&&-1!==o.labels.indexOf(a):o.isLoop||o.isSwitch)return void i.pop()}else if(e===r.Completion.CONTINUE&&(a?o.labels&&-1!==o.labels.indexOf(a):o.isLoop))return}var s;if(this.isa(t,this.ERROR)){var l={EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},c=this.getProperty(t,"name").toString(),u=this.getProperty(t,"message").valueOf();s=(e=l[c]||Error)(u+n)}else s=String(t)+n;throw s},r.prototype.createGetter_=function(e,t){var a=Array.isArray(t)?t[0]:t,n=new this.nodeConstructor;n.type="CallExpression";var i=new r.State(n,this.stateStack[this.stateStack.length-1].scope);return i.doneCallee_=!0,i.funcThis_=a,i.func_=e,i.doneArgs_=!0,i.arguments_=[],i},r.prototype.createSetter_=function(e,t,a){var n=Array.isArray(t)?t[0]:this.global,i=new this.nodeConstructor;i.type="CallExpression";var o=new r.State(i,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=n,o.func_=e,o.doneArgs_=!0,o.arguments_=[a],o},r.State=function(e,t){this.node=e,this.scope=t},r.prototype.stepArrayExpression=function(e,t,a){var n=a.elements,i=t.n_||0;for(t.array_?(this.setProperty(t.array_,i,t.value),i++):(t.array_=this.createObjectProto(this.ARRAY_PROTO),t.array_.properties.length=n.length);i>=":s>>=l;break;case">>>=":s>>>=l;break;case"&=":s&=l;break;case"^=":s^=l;break;case"|=":s|=l;break;default:throw SyntaxError("Unknown assignment expression: "+a.operator)}var c=this.setValue(t.leftReference_,s);if(c)return t.doneSetter_=!0,t.setterValue_=s,this.createSetter_(c,t.leftReference_,s);e.pop(),e[e.length-1].value=s},r.prototype.stepBinaryExpression=function(e,t,a){if(!t.doneLeft_)return t.doneLeft_=!0,new r.State(a.left,t.scope);if(!t.doneRight_)return t.doneRight_=!0,t.leftValue_=t.value,new r.State(a.right,t.scope);e.pop();var n,i=t.leftValue_,o=t.value;switch(a.operator){case"==":n=i==o;break;case"!=":n=i!=o;break;case"===":n=i===o;break;case"!==":n=i!==o;break;case">":n=i>o;break;case">=":n=i>=o;break;case"<":n=i>":n=i>>o;break;case">>>":n=i>>>o;break;case"in":if(!o||!o.isObject){let e=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+o+"'",e)}n=this.hasProperty(o,i);break;case"instanceof":if(!this.isa(o,this.FUNCTION)){let e=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object",e)}n=!!i.isObject&&this.isa(i,o);break;default:throw SyntaxError("Unknown binary operator: "+a.operator)}e[e.length-1].value=n},r.prototype.stepBlockStatement=function(e,t,a){var n=t.n_||0,i=a.body[n];if(i)return t.n_=n+1,new r.State(i,t.scope);e.pop()},r.prototype.stepBreakStatement=function(e,t,a){var n=a.label&&a.label.name;this.unwind(r.Completion.BREAK,void 0,n)},r.prototype.stepCallExpression=function(e,t,a){if(!t.doneCallee_){t.doneCallee_=1;var i=new r.State(a.callee,t.scope);return i.components=!0,i}if(1===t.doneCallee_){t.doneCallee_=2;var o=t.value;if(Array.isArray(o)){if(t.func_=this.getValue(o,a),o[0]===r.SCOPE_REFERENCE?t.directEval_="eval"===o[1]:t.funcThis_=o[0],(o=t.func_)&&"object"==typeof o&&o.isGetter)return o.isGetter=!1,t.doneCallee_=1,this.createGetter_(o,t.value)}else t.func_=o;t.arguments_=[],t.n_=0}o=t.func_;if(!t.doneArgs_){if(0!==t.n_&&t.arguments_.push(t.value),a.arguments[t.n_])return new r.State(a.arguments[t.n_++],t.scope);if("NewExpression"===a.type){if(o.illegalConstructor){let e=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,o+" is not a constructor",e)}var s=o.properties.prototype;"object"==typeof s&&null!==s||(s=this.OBJECT_PROTO),t.funcThis_=this.createObjectProto(s),t.isConstructor=!0}else void 0===t.funcThis_&&(t.funcThis_=t.scope.strict?void 0:this.global);t.doneArgs_=!0}if(t.doneExec_)e.pop(),t.isConstructor&&"object"!=typeof t.value?e[e.length-1].value=t.funcThis_:e[e.length-1].value=t.value;else{if(t.doneExec_=!0,!o||!o.isObject){let e=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,o+" is not a function",e)}var l=o.node;if(l){for(var c=this.createScope(l.body,o.parentScope),u=0;uu?t.arguments_[u]:void 0;this.setProperty(c,m,h)}var p=this.createObjectProto(this.ARRAY_PROTO);for(u=0;ue.name),o=[];function s(e){return e.name!==r.a.NeuroFluxGovernor&&(!a.includes(e.name)&&(!o.includes(e)&&!e.isSpecial))}if(t.inGang()){const e=t.getGangFaction();for(const t in n.a){const a=n.a[t];s(a)&&(e.playerReputation>a.baseRepRequirement&&o.push(a))}return o}for(const e of t.factions){if("Bladeburners"===e)continue;if("Netburners"===e)continue;const t=i.a[e];if(null!=t)for(const e of t.augmentations){const a=n.a[e];s(a)&&(t.playerReputation>a.baseRepRequirement&&o.push(a))}}return o}},function(e,t,a){"use strict";function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}a.d(t,"a",(function(){return r}));class r{constructor(e,t){n(this,"lvl",1),n(this,"n",1),this.n=e,this.lvl=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(163),i=a(4);function o(e){let t=e.aug.name;return null!=e.level&&e.aug.name===i.a.NeuroFluxGovernor&&(t+=" - Level "+e.level),"string"==typeof e.aug.info?n.createElement(r.a,{headerContent:n.createElement(n.Fragment,null,t),panelContent:n.createElement("p",null,n.createElement("span",{dangerouslySetInnerHTML:{__html:e.aug.info}}),n.createElement("br",null),n.createElement("br",null),e.aug.stats)}):n.createElement(r.a,{headerContent:n.createElement(n.Fragment,null,t),panelContent:n.createElement("p",null,e.aug.info,n.createElement("br",null),n.createElement("br",null),e.aug.stats)})}},,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(9);function s(e){const[t,a]=Object(n.useState)();return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of team members you would like to take on this Op. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."),r.a.createElement("input",{autoFocus:!0,type:"number",placeholder:"Team size",className:"text-input",onChange:e=>a(parseFloat(e.target.value))}),r.a.createElement("a",{className:"a-link-button",onClick:function(){if(void 0===t)return;const a=Math.round(t);isNaN(a)||a<0?Object(o.a)("Invalid value entered for number of Team Members (must be numeric, positive)"):e.action.teamCount=a,Object(i.b)(e.popupId)}},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(55);function r(e){const t=[];for(const a in n.a){const r=n.a[a].create;null!=r&&(e.hasProgram(n.a[a].name)||r.req(e)&&t.push(n.a[a]))}return t}},function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(921),r=a(18),i=a(259),o=a(4),s=a(16);function l(e,t){const a=e.getCost();if(!t.canAfford(a))return!1;t.loseMoney(a),t.hacking_exp=e.hacking_exp,t.strength_exp=e.strength_exp,t.defense_exp=e.defense_exp,t.dexterity_exp=e.dexterity_exp,t.agility_exp=e.agility_exp,t.charisma_exp=e.charisma_exp;for(const e in r.a)r.a[e].owned=!1;for(let e=t.augmentations.length-1;e>=0;--e)t.augmentations[e].name!==o.a.NeuroFluxGovernor?t.augmentations.splice(e,1):r.a[o.a.NeuroFluxGovernor].owned=!0;for(let a=0;a=0;--e){const a=t.queuedAugmentations[e].name;t.augmentations.filter(e=>e.name!==o.a.NeuroFluxGovernor&&e.name===a).length>=1&&t.queuedAugmentations.splice(e,1)}return t.reapplyAllAugmentations(!0),t.reapplyAllSourceFiles(),!0}function c(){const e=[];for(let t=0;t<40;++t){const a=new n.a,i=5*t+1;a.hacking_exp=i*Object(s.a)(1e3,5e3),a.strength_exp=i*Object(s.a)(1e3,5e3),a.defense_exp=i*Object(s.a)(1e3,5e3),a.dexterity_exp=i*Object(s.a)(1e3,5e3),a.agility_exp=i*Object(s.a)(1e3,5e3),a.charisma_exp=i*Object(s.a)(1e3,5e3);const l=Math.max(2,Math.ceil((t+3)/2)),c=Object(s.a)(l,l+2),u=Object.keys(r.a);for(let e=0;eObject(o.a)({modal:{display:"flex",alignItems:"center",justifyContent:"center"},paper:{backgroundColor:e.palette.background.paper,border:"2px solid "+e.palette.primary.main,boxShadow:e.shadows[5],padding:2,maxWidth:"80%",maxHeight:"80%",overflow:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}})),m=e=>{const t=u();return r.a.createElement(s.a,{open:e.open,onClose:e.onClose,closeAfterTransition:!0,className:t.modal,BackdropComponent:l.a,BackdropProps:{timeout:100}},r.a.createElement(c.a,{in:e.open},r.a.createElement("div",{className:t.paper},e.children)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){return r.a.createElement("span",{style:{fontSize:"1em"},className:"blinking-cursor"},"|")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(183);function i(e){return Object(r.a)(n.a.formatHashes(e)+" / sec")}},,function(e,t,a){"use strict";function n(e){function t(e,t,a){return e*t+a}const a=t(e,Math.log(51)-Math.log(50),Math.log(51));return t(500,Math.exp(a),-25e3)}function r(e){return-Math.log(25500/(e+25e3))/Math.log(1.02)}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return r}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(238),r=a(14);class i extends n.a{constructor(e=null){super(e)}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceContract}toJSON(){return Object(r.b)("Contract",this)}static fromJSON(e){return Object(r.a)(i,e.data)}}r.c.constructors.Contract=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={helpList:["Use 'help [command]' to get more information about a particular Bladeburner console command.",""," automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks"," clear/cls Clear the console"," help [cmd] Display this help text, or help text for a specific command"," log [en/dis] [type] Enable or disable logging for events and actions"," skill [action] [name] Level or display info about your Bladeburner skills"," start [type] [name] Start a Bladeburner action/task"," stop Stops your current Bladeburner action/task"],automate:["automate [var] [val] [hi/low]","","A simple way to automate your Bladeburner actions. This console command can be used to automatically start an action when your stamina rises above a certain threshold, and automatically switch to another action when your stamina drops below another threshold."," automate status - Check the current status of your automation and get a brief description of what it'll do"," automate en - Enable the automation feature"," automate dis - Disable the automation feature","","There are four properties that must be set for this automation to work properly. Here is how to set them:",""," automate stamina 100 high"," automate contract Tracking high"," automate stamina 50 low"," automate general 'Field Analysis' low","","Using the four console commands above will set the automation to perform Tracking contracts if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below 50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must exactly match whatever the name is in the UI."],clear:["clear","","Clears the console"],cls:["cls","","Clears the console"],help:["help [command]","","Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:",""," help automate","","will display specific information about using the automate console command"],log:["log [en/dis] [type]","","Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:","","[general, contracts, ops, blackops, events]","","The logging for these categories can be enabled or disabled like so:",""," log dis contracts - Disables logging that occurs when contracts are completed"," log en contracts - Enables logging that occurs when contracts are completed"," log dis events - Disables logging for Bladeburner random events","","Logging can be universally enabled/disabled using the 'all' keyword:",""," log dis all"," log en all"],skill:["skill [action] [name]","","Level or display information about your skills.","","To display information about all of your skills and your multipliers, use:",""," skill list","","To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:",""," skill list Reaper
skill list 'Digital Observer'","","This console command can also be used to level up skills:",""," skill level [skill name]"],start:["start [type] [name]","","Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:","","[general, contract, op, blackop]","","Examples:",""," start contract Tracking"," start op 'Undercover Operation'"],stop:["stop","","Stop your current action and go idle."]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(271),r=a(2);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class o{constructor(e={cost:0,text:""}){if(i(this,"children",[]),i(this,"cost",0),i(this,"researched",!1),i(this,"parent",null),i(this,"text",""),null==n.a[e.text])throw new Error("Invalid Research name used when constructing ResearchTree Node: "+e.text);this.text=e.text,this.cost=e.cost,e.children&&e.children.length>0&&(this.children=e.children),null!=e.parent&&(this.parent=e.parent)}addChild(e){this.children.push(e),e.parent=this}createTreantMarkup(){const e=[];for(let t=0;t${this.text}
${r.a.format(this.cost,"0,0")} Scientific Research`+a.desc+"",text:{name:this.text}}}findNode(e){if(this.text===e)return this;let t=null;for(let a=0;a{t.innerText="",t.style.display="none",t.classList.remove("status-text")},3e3)}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){let t="cmpy-mgmt-header-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick},e.text)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(963),i=a(964),o=a(101),s=a(328),l=a(40),c=a(5),u=a(9);class m extends n.Component{constructor(e){super(e),this.state={city:e.p.city,inCity:null==e.initiallyInCity||e.initiallyInCity,location:e.p.location},this.enterLocation=this.enterLocation.bind(this),this.returnToCity=this.returnToCity.bind(this),this.travel=this.travel.bind(this)}enterLocation(e){this.props.p.gotoLocation(e),this.setState({inCity:!1,location:e})}returnToCity(){this.setState({inCity:!0})}renderCity(){const e=o.a[this.state.city];if(null==e)throw new Error("Invalid city when rendering UI: "+this.state.city);return n.createElement("div",{className:"noselect"},n.createElement("h2",null,this.state.city),n.createElement(r.a,{city:e,enterLocation:this.enterLocation}))}renderLocation(){const e=s.a[this.state.location];if(null==e)throw new Error("Invalid location when rendering UI: "+this.state.location);return e.types.includes(l.a.StockMarket)&&this.props.engine.loadStockMarketContent(),n.createElement(i.a,{engine:this.props.engine,loc:e,p:this.props.p,returnToCity:this.returnToCity,travel:this.travel})}travel(e){const t=this.props.p,a=c.a.TravelCost;if(t.canAfford(a)){if(t.loseMoney(a),t.travel(e),Object(u.a)(n.createElement("span",{className:"noselect"},"You are now in ",e,"!")),!1===t.firstTimeTraveled){t.firstTimeTraveled=!0;const e=document.getElementById("travel-tab"),a=document.getElementById("world-menu-header");null!=e&&null!==a&&(e.style.display="list-item",a.click(),a.click())}this.props.p.travel(e)&&this.setState({inCity:!0,city:e})}else Object(u.a)("You cannot afford to travel to "+e)}render(){return this.state.inCity?this.renderCity():this.renderLocation()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(48),o=a(214);function s(){return(s=Object.assign||function(e){for(var t=1;tr.a.createElement(i.a,s({},e,{classes:{...l(),...e.classes}}))},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(16);const r={Tracking:()=>Object(n.a)(5,75)/10,"Bounty Hunter":()=>Object(n.a)(5,75)/10,Retirement:()=>Object(n.a)(5,75)/10,Investigation:()=>Object(n.a)(10,40)/10,"Undercover Operation":()=>Object(n.a)(10,40)/10,"Sting Operation":()=>Object(n.a)(3,40)/10,Raid:()=>Object(n.a)(2,40)/10,"Stealth Retirement Operation":()=>Object(n.a)(1,20)/10,Assassination:()=>Object(n.a)(1,20)/10}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(82),r=a(205);function i(e){if(null!==e)try{const t=Object(n.a)(e)?Object(r.a)(e):e;if(t instanceof Element)for(;null!==t.firstChild;)t.removeChild(t.firstChild)}catch(e){return void console.debug(e)}}},function(e,t,a){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(5);function r(e,t){return e/n.a.DonateMoneyToRepDivisor*t.faction_rep_mult}},function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"a",(function(){return o}));var n=a(89);function r(e){return"string"==typeof e&&!isNaN(parseFloat(e))}function i(e){const t=(e=(e=e.trim()).replace(/\s\s+/g," ")).match(/(?:'[^']*'|"[^"]*"|[^;"])*/g);if(!t)return[];const a=t.map(n.h).map(e=>e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat(),r=[];for(const e of a)null!==e&&(e.match(/^\s*$/)||r.push(e.trim()));return r}function o(e){let t="";const a=[];let n=0,i=0,o="";for(;i=1&&(o=e.charAt(i-1),"\\"===o&&(s=!0));const l=e.charAt(i);if('"'===l)if(s||" "!==o)""===t?t='"':'"'===t&&(t="");else{const t=e.indexOf('"',i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(i+1,t-i-1)),n=i=t===e.length-1?t+1:t+2;continue}}else if("'"===l)if(s||" "!==o)""===t?t="'":"'"===t&&(t="");else{const t=e.indexOf("'",i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(i+1,t-i-1)),n=i=t===e.length-1?t+1:t+2;continue}}else if(" "===l&&""===t){const t=e.substr(n,i-n);r(t)?a.push(parseFloat(t)):a.push(t),n=i+1}++i}if(n!==i){const t=e.substr(n,i-n);r(t)?a.push(parseFloat(t)):a.push(t)}return a}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(2);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of free command. Usage: free");const o=n.a.formatRAM(a.getCurrentServer().maxRam),s=n.a.formatRAM(a.getCurrentServer().ramUsed),l=n.a.formatRAM(a.getCurrentServer().maxRam-a.getCurrentServer().ramUsed),c=Math.max(o.length,Math.max(s.length,l.length)),u=n.a.formatPercentage(a.getCurrentServer().ramUsed/a.getCurrentServer().maxRam);e.print(`Total: ${" ".repeat(c-o.length)}${o}`),e.print(`Used: ${" ".repeat(c-s.length)}${s} (${u})`),e.print(`Available: ${" ".repeat(c-l.length)}${l}`)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(95),r=a(88);function i(e,t,a,i,o){const s=o.length;function l(){e.error("Incorrect usage of ls command. Usage: ls [dir] [| grep pattern]")}if(s>5||3===s)return l();let c="",u=e.cwd();if(u.endsWith("/")||(u+="/"),s>=4){if("grep"!==o[s-1]||"|"!==o[s-2])return l();c=o[s]+""}if(s>=2&&"|"!==o[0]){const t=Object(r.a)(o[0]+"",e.cwd());if(u=t||"",null!=u&&(u.endsWith("/")||(u+="/"),!Object(r.f)(u)))return l()}"/"===u&&(u="");const m=[],h=[],p=[],d=[],f=[],g=[];function y(e,t){let a=e;if(u){if(!e.startsWith(u))return;a=e.slice(u.length,e.length)}if(!c||a.includes(c))if(a.includes("/")){const e=Object(r.d)(a);if(c&&!e.includes(c))return;g.includes(e)||g.push(e)}else t.push(a)}const b=a.getCurrentServer();for(const e of b.programs)y(e,m);for(const e of b.scripts)y(e.filename,h);for(const e of b.textFiles)y(e.fn,p);for(const e of b.contracts)y(e.fn,d);for(const e of b.messages)e instanceof n.a?y(e.filename,f):y(e,f);function E(t){const a=Math.max(...t.map(e=>e.length))+1,n=Math.floor(80/a);for(let r=0;re.segments.length>0);for(let t=0;t{const a=Object(n.c)(o,t);if(null===a)throw new Error("Server should not be null");return{hostname:a.hostname,ip:a.ip,hasRoot:a.hasAdminRights?"Y":"N"}});s.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const l=Math.max(...s.map(e=>e.hostname.length)),c=Math.max(...s.map(e=>e.ip.length));for(const t of s){if(!t)continue;let a=t.hostname;a+=" ".repeat(l-t.hostname.length+1),a+=t.ip,a+=" ".repeat(c-t.ip.length+1),a+=t.hasRoot,e.print(a)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(77),r=a(53),i=a(14);class o{constructor(e="",t=0,a=0,i=n.a.LimitBuy,o=r.a.Long){let s=!1;if("number"==typeof t&&"number"==typeof a||(s=!0),(isNaN(t)||isNaN(a))&&(s=!0),"string"!=typeof e&&(s=!0),s)throw new Error("Invalid constructor paramters for Order");this.stockSymbol=e,this.shares=t,this.price=a,this.type=i,this.pos=o}toJSON(){return Object(i.b)("Order",this)}static fromJSON(e){return Object(i.a)(o,e.data)}}i.c.constructors.Order=o},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(66);const r={longestName:0,longestSymbol:0};for(const e in n.a)r.longestName=Math.max(e.length,r.longestName),r.longestSymbol=Math.max(n.a[e].length,r.longestSymbol)},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(709);function o(e){const[t,a]=Object(n.useState)(0);return r.a.createElement(r.a.Fragment,null,e.lines.slice(0,t).map((e,t)=>r.a.createElement("pre",{key:t},e)),e.lines.length>t&&r.a.createElement(i.a,{key:t,text:e.lines[t],onDone:function(){const n=t+1;a(n),n>=e.lines.length&&e.onDone&&e.onDone()}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(7);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class i{constructor(e){r(this,"city",null),r(this,"costMult",0),r(this,"expMult",0),r(this,"name",n.a.Void),r(this,"types",[]),r(this,"techVendorMaxRam",0),r(this,"techVendorMinRam",0),e.city&&(this.city=e.city),e.costMult&&(this.costMult=e.costMult),e.expMult&&(this.expMult=e.expMult),e.infiltrationData&&(this.infiltrationData=e.infiltrationData),e.name&&(this.name=e.name),e.types&&(this.types=e.types),e.techVendorMaxRam&&(this.techVendorMaxRam=e.techVendorMaxRam),e.techVendorMinRam&&(this.techVendorMinRam=e.techVendorMinRam)}}},,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){let t="cmpy-mgmt-city-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick},e.name)}},function(e,t,a){"use strict";function n(e){return null==e||e.options.length<=0||e.selectedIndex<0?"":e.options[e.selectedIndex].text}a.d(t,"a",(function(){return n}))},,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(27),o=a(90),s=a(85);const l={All:0,Foreign:1,Owned:2,Purchased:3};function c(e){function t(t){const a=t instanceof o.a&&t.purchasedByPlayer,n=e.serverType;switch(n){case l.All:return!0;case l.Foreign:return"home"!==t.hostname&&!a;case l.Owned:return a||t instanceof s.a||"home"===t.hostname;case l.Purchased:return a||t instanceof s.a;default:return console.warn("Invalid ServerType specified for ServerDropdown component: "+n),!1}}const a=[];for(const e in i.b){const n=i.b[e];t(n)&&a.push(r.a.createElement("option",{key:n.hostname,value:n.hostname},n.hostname))}return r.a.createElement("select",{className:"dropdown",onChange:e.onChange,style:e.style},a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(189);const o=({card:e,hidden:t})=>{let a;switch(e.suit){case i.b.Clubs:a=r.a.createElement("span",null,"♣");break;case i.b.Diamonds:a=r.a.createElement("span",null,"♦");break;case i.b.Hearts:a=r.a.createElement("span",null,"♥");break;case i.b.Spades:a=r.a.createElement("span",null,"♠");break;default:throw new Error("MissingCaseException: "+e.suit)}return r.a.createElement("div",{className:"casino-card "+(e.isRedSuit()?"red":"black")},r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"value"},t?" - ":e.formatValue()),r.a.createElement("div",{className:"suit"},t?" - ":a)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(286),o=a(214);function s(){return(s=Object.assign||function(e){for(var t=1;tr.a.createElement(i.a,s({},e,{classes:{...l(),...e.classes}}))},,function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=new class{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:-1,column:-1}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n="interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise;\n grow(ip: string, threads: number, stock: boolean): Promise;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise;\n installBackdoor(): Promise;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationPrereq(name: string): string[];\n getAugmentationPrice(name: string): number;\n getAugmentationRepReq(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}"},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(24),r=a(35);function i(e,t){const a=t.augmentations.slice().filter(e=>"NeuroFlux Governor"!==e);for(const t of a)if(!e.augmentations.some(e=>e.name==t))return!1;return!0}const o=[{title:"Gain root access on CSEC",fulfilled:()=>{const e=Object(r.a)("CSEC");return!(!e||!e.hasOwnProperty("hasAdminRights"))&&e.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const e=Object(r.a)("CSEC");return!(!e||!e.hasOwnProperty("backdoorInstalled"))&&e.backdoorInstalled}},{title:"Join the faction hinted at in csec-test.msg",fulfilled:e=>e.factions.includes("CyberSec")},{title:"Install all the Augmentations from CyberSec",fulfilled:e=>i(e,n.a.CyberSec)},{title:"Join the faction hinted at in nitesec-test.msg",fulfilled:e=>e.factions.includes("NiteSec")},{title:"Install all the Augmentations from NiteSec",fulfilled:e=>i(e,n.a.NiteSec)},{title:"Join the faction hinted at in j3.msg",fulfilled:e=>e.factions.includes("The Black Hand")},{title:"Install all the Augmentations from The Black Hand",fulfilled:e=>i(e,n.a["The Black Hand"])},{title:"Join the faction hinted at in 19dfj3l1nd.msg",fulfilled:e=>e.factions.includes("BitRunners")},{title:"Install all the Augmentations from BitRunners",fulfilled:e=>i(e,n.a.BitRunners)},{title:"Complete fl1ght.exe",fulfilled:e=>e.factions.includes("Daedalus")},{title:"Install the special Augmentation from Daedalus",fulfilled:e=>e.augmentations.some(e=>"The Red Pill"==e.name)},{title:"Install the final backdoor and free yourself.",fulfilled:()=>!1}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a(2),i=a(163),o=a(279),s=a(99),l=a(9),c=a(208),u=a(12),m=a(211),h=a(11);function p(e){const t=e.workerScript.scriptRef,a=c.a.bind(null,t),p=s.a.bind(null,t,t.server);const d=t.onlineMoneyMade/t.onlineRunningTime,f=t.onlineExpGained/t.onlineRunningTime,g=t.offlineMoneyMade/t.offlineRunningTime,y=t.offlineExpGained/t.offlineRunningTime;return n.createElement(i.a,{headerClass:"active-scripts-script-header",headerContent:n.createElement(n.Fragment,null,e.workerScript.name),panelClass:"active-scripts-script-panel",panelContent:n.createElement(n.Fragment,null,n.createElement("pre",null,"Threads: ",r.a.formatThreads(e.workerScript.scriptRef.threads)),n.createElement("pre",null,"Args: ",Object(m.a)(e.workerScript.args)),n.createElement("pre",null,"Online Time: ",Object(u.b)(1e3*t.onlineRunningTime)),n.createElement("pre",null,"Offline Time: ",Object(u.b)(1e3*t.offlineRunningTime)),n.createElement("pre",null,"Total online production: ",n.createElement(h.a,{money:t.onlineMoneyMade})),n.createElement("pre",null,Array(26).join(" ")+r.a.formatExp(t.onlineExpGained)+" hacking exp"),n.createElement("pre",null,"Online production rate: ",n.createElement(h.a,{money:d})," / second"),n.createElement("pre",null,Array(25).join(" ")+r.a.formatExp(f)+" hacking exp / second"),n.createElement("pre",null,"Total offline production: ",n.createElement(h.a,{money:t.offlineMoneyMade})),n.createElement("pre",null,Array(27).join(" ")+r.a.formatExp(t.offlineExpGained)+" hacking exp"),n.createElement("pre",null,"Offline production rate: ",n.createElement(h.a,{money:g})," / second"),n.createElement("pre",null,Array(26).join(" ")+r.a.formatExp(y)+" hacking exp / second"),n.createElement(o.a,{onClick:a,text:"Log"}),n.createElement(o.a,{onClick:function(){p(),Object(l.a)("Killing script")},text:"Kill Script"}))})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(205),r=a(182);function i(){Object(r.a)("loader"),Object(n.a)("entire-game-container").style.visibility="visible"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(14);const r=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];class i{constructor(){var e,t,a;a=0,(t="state")in(e=this)?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a}getState(){return r[this.state]}nextState(){(this.state<0||this.state>=r.length)&&(this.state=0),++this.state,this.state>=r.length&&(this.state=0)}toJSON(){return Object(n.b)("CorporationState",this)}static fromJSON(e){return Object(n.a)(i,e.data)}}n.c.constructors.CorporationState=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){function t(t){"Escape"===t.key&&e.removePopup()}return Object(n.useEffect)(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)})),r.a.createElement("div",{className:"popup-box-content",id:e.id+"-content"},r.a.createElement(e.content,e.props))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(111),r=a(44);const i={};!function(){let e,t,a;e="The Beginner's Guide to Hacking",t=r.a.HackersStartingHandbook,a="Some resources:

Learn to Program

For Experienced JavaScript Developers: NetscriptJS

Netscript Documentation

When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()

-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game

-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",i[t]=new n.a(e,t,a),e="The Complete Handbook for Creating a Successful Corporation",t=r.a.CorporationManagementHandbook,a="Getting Started with Corporations
To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.

Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.

The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.

Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.

Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.

Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.

These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.

Tips/Pointers
-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.

-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.

-If your employees have low morale, energy, or happiness, their production will greatly suffer.

-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

-Don't forget to advertise your company. You won't have any business if nobody knows you.

-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales

-Remember, you need to spend money to make money!

-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",i[t]=new n.a(e,t,a),e="A Brief History of Synthoids",t=r.a.HistoryOfSynthoids,a="Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, are composed entirely of organic substances. For this reason, Synthoids are virtually identical to humans in form, composition, and appearance.

Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued OmniTek had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.

All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.

It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.

In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. In response, many nations have created Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.

To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

Nobody knows what happened to the terrorist group Ascendis Totalis.",i[t]=new n.a(e,t,a),e="A Green Tomorrow",t=r.a.AGreenTomorrow,a="Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.

The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",i[t]=new n.a(e,t,a),e="Alpha and Omega",t=r.a.AlphaOmega,a="Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.'

And once we were seated on the throne we said 'Behold, I am making all things new.' Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, 'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring of the water of life without payment. The one who conquers will have this heritage, and we will be his God and he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, for it is the second true death.'",i[t]=new n.a(e,t,a),e="Are We Living in a Computer Simulation?",t=r.a.SimulatedReality,a="The idea that we are living in a virtual world is not new. It's a trope that has been explored constantly in literature and pop culture. However, it is also a legitimate scientific hypothesis that many notable physicists and philosophers have debated for years.

Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if continued technological advancement is a reasonable outcome, then it is very likely that such a scenario has already happened.

Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",i[t]=new n.a(e,t,a),e="Beyond Man",t=r.a.BeyondMan,a="Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?

Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",i[t]=new n.a(e,t,a),e="Brighter than the Sun",t=r.a.BrighterThanTheSun,a="When people think about the corporations that dominate the East, they typically think of KuaiGong International, which holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word for 'sun'. In Chinese culture, the sun is a 'yang' symbol associated with life, heat, masculinity, and heaven.

The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.",i[t]=new n.a(e,t,a),e="Democracy is Dead: The Fall of an Empire",t=r.a.DemocracyIsDead,a="They rose from the shadows in the street.
From the places where the oppressed meet.
Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
Loudness in the silence, Darkness in the light.
They came forth with power and might.
Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
From the ashes rose a new order, corporatocracy was its name.
Rome, Mongol, Byzantine, all of history is just the same.
For man will never change in a fundamental way.
And now democracy is dead, in the USA.",i[t]=new n.a(e,t,a),e="Figures Show Rising Crime Rates in Sector-12",t=r.a.Sector12Crime,a="A recent study by analytics company Wilson Inc. shows a significant rise in criminal activity in Sector-12. Perhaps the most alarming part of the statistic is that most of the rise is in violent crime such as homicide and assault. According to the study, the city saw a total of 21,406 reported homicides in 2076, which is over a 20% increase compared to 2075.

CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.",i[t]=new n.a(e,t,a),e="Man and the Machine",t=r.a.ManAndMachine,a="In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate of technological advancement would continue to accelerate faster and faster until one day machines would be become infinitely more intelligent than humans. This point, called the Singularity, would result in a drastic transformation of the world as we know it. He predicted that the Singularity would arrive by 2045. And yet here we are, more than three decades later, where most would agree that we have not yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",i[t]=new n.a(e,t,a),e="Secret Societies",t=r.a.SecretSocieties,a="The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and distrust. People have long wondered about who these secret society members are and what they do, with the most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world may never know for sure, it is likely that many secret societies do actually exist, even today.

However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.

Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious Bitrunners, whose purpose still remains unknown.",i[t]=new n.a(e,t,a),e="Space: The Failed Frontier",t=r.a.TheFailedFrontier,a="Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, we pushed the boundaries of our scientific limits, and then pushed further. Space exploration lead to the development of many important technologies and new industries.

But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.

And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",i[t]=new n.a(e,t,a),e="Coded Intelligence: Myth or Reality?",t=r.a.CodedIntelligence,a="Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create human intelligence.

We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'",i[t]=new n.a(e,t,a),e="Synthetic Muscles",t=r.a.SyntheticMuscles,a="Initial versions of synthetic muscles weren't made of anything organic but were actually crude devices made to mimic human muscle function. Some of the early iterations were actually made of common materials such as fishing lines and sewing threads due to their high strength for a cheap cost.

As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",i[t]=new n.a(e,t,a),e="Tensions rise in global tech race",t=r.a.TensionsInTechRace,a="Have we entered a new Cold War? Is WWIII just beyond the horizon?

After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, MegaCorp and ECorp have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.",i[t]=new n.a(e,t,a),e="The Cost of Immortality",t=r.a.CostOfImmortality,a="Evolution and advances in medical and augmentation technology has lead to drastic improvements in human mortality rates. Recent figures show that the life expectancy for humans that live in a first-world country is about 130 years of age, almost double of what it was at the turn of the century. However, this increase in average lifespan has had some significant effects on society and culture.

Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.

Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",i[t]=new n.a(e,t,a),e="The Hidden World",t=r.a.TheHiddenWorld,a="WAKE UP SHEEPLE

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

Yes, the Illuminati of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.

OPEN YOUR EYES

It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.

THEY ARE ALL AROUND YOU

After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.",i[t]=new n.a(e,t,a),e="The New God",t=r.a.TheNewGod,a="Everyone has a moment in their life when they wonder about the bigger questions.

What's the point of all this? What is my purpose?

Some people dare to think even bigger.

What will the fate of the human race be?

We live in an era vastly different from that of 15 or even 20 years ago. We have gone beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

The Singularity is here. The merging of man and machine. This is where humanity evolves into ",i[t]=new n.a(e,t,a),e="The New Triads",t=r.a.NewTriads,a="The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian territories. They were often considered one of the first and biggest criminal secret societies. While most of the branches of the Triads have been destroyed over the past few decades, the crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. The most notable of these is the Tetrads.

It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.

Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.",i[t]=new n.a(e,t,a),e="The Secret War",t=r.a.TheSecretWar,a="",i[t]=new n.a(e,t,a)}()},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(615),r=a(616),i=a(710),o=a(711),s=a(712),l=a(716),c=a(273),u=a(21),m=a(278),h=a(14),p=a(74);function d(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new p.a(1e3),this.homeComputer="",this.city=u.a.Sector12,this.location="",this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new c.a,this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.isWorking=!1,this.focus=!1,this.workType="",this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.createProgramName="",this.createProgramReqLvl=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.gang=null,this.corporation=null,this.bladeburner=null,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.sleeves=[],this.resleeves=[],this.sleevesFromCovenant=0,this.bitNodeN=1,this.firstFacInvRecvd=!1,this.firstAugPurchased=!1,this.firstTimeTraveled=!1,this.firstProgramAvailable=!1,this.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new m.a,this.moneySourceB=new m.a,this.scriptProdSinceLastAug=0,this.exploits=[]}Object.assign(d.prototype,s,l,r,i,o,n),d.prototype.toJSON=function(){return Object(h.b)("PlayerObject",this)},d.fromJSON=function(e){return Object(h.a)(d,e.data)},h.c.constructors.PlayerObject=d},function(e,t,a){"use strict";a.r(t),a.d(t,"hasAugmentation",(function(){return r}));var n=a(26);function r(e){const t=e instanceof n.a?e.name:e;for(const e of this.augmentations)if(e.name===t)return!0;for(const e of this.queuedAugmentations)if(e.name===t)return!0;return!1}},function(e,t,a){"use strict";a.r(t),a.d(t,"canAccessBladeburner",(function(){return i})),a.d(t,"inBladeburner",(function(){return o})),a.d(t,"startBladeburner",(function(){return s}));var n=a(147),r=a(50);function i(){return 8!==this.bitNodeN&&(6===this.bitNodeN||7===this.bitNodeN||r.a[6]>0||r.a[7]>0)}function o(){return null!=this.bladeburner&&this.bladeburner instanceof n.a}function s(){this.bladeburner=new n.a(this)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(23),r=a(7);const i={},o={},s={},l={},c={},u={},m={},h={},p={},d={},f={},g={},y={},b={},E={},v={},k={},_={},C={};n.j.forEach(e=>{i[e]=!0,c[e]=!0}),n.d.forEach(e=>{o[e]=!0,c[e]=!0}),n.f.forEach(e=>{s[e]=!0,c[e]=!0}),c[n.i[0]]=!0,l[n.i[0]]=!0,n.b.forEach(e=>{u[e]=!0}),n.h.forEach(e=>{h[e]=!0}),n.a.forEach(e=>{m[e]=!0}),n.k.forEach(e=>{p[e]=!0}),n.c.forEach(e=>{d[e]=!0});for(let e=0;e=e}}const d=[{key:"NukeProgram",name:"NUKE.exe",create:{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:p(1),time:n.a.MillisecondsPerFiveMinutes},run:(e,t,a)=>{if(a instanceof r.a){if(!a.hasAdminRights)return a.openPortCount>=t.getCurrentServer().numOpenPortsRequired?(a.hasAdminRights=!0,void e.print("NUKE successful! Gained root access to "+t.getCurrentServer().hostname)):void e.print("NUKE unsuccessful. Not enough ports have been opened");e.print("You already have root access to this computer. There is no reason to run NUKE.exe")}else e.error("Cannot nuke this kind of server.")}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:p(50),time:2*n.a.MillisecondsPerFiveMinutes},run:(e,t,a)=>{a instanceof r.a?a.sshPortOpen?e.print("SSH Port (22) is already open!"):(a.sshPortOpen=!0,e.print("Opened SSH Port(22)!"),a.openPortCount++):e.error("Cannot run BruteSSH.exe on this kind of server.")}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:p(100),time:n.a.MillisecondsPerHalfHour},run:(e,t,a)=>{a instanceof r.a?a.ftpPortOpen?e.print("FTP Port (21) is already open!"):(a.ftpPortOpen=!0,e.print("Opened FTP Port (21)!"),a.openPortCount++):e.error("Cannot run FTPCrack.exe on this kind of server.")}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:p(250),time:n.a.MillisecondsPer2Hours},run:(e,t,a)=>{a instanceof r.a?a.smtpPortOpen?e.print("SMTP Port (25) is already open!"):(a.smtpPortOpen=!0,e.print("Opened SMTP Port (25)!"),a.openPortCount++):e.error("Cannot run relaySMTP.exe on this kind of server.")}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:p(500),time:n.a.MillisecondsPer4Hours},run:(e,t,a)=>{a instanceof r.a?a.httpPortOpen?e.print("HTTP Port (80) is already open!"):(a.httpPortOpen=!0,e.print("Opened HTTP Port (80)!"),a.openPortCount++):e.error("Cannot run HTTPWorm.exe on this kind of server.")}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:p(750),time:n.a.MillisecondsPer8Hours},run:(e,t,a)=>{a instanceof r.a?a.sqlPortOpen?e.print("SQL Port (1433) is already open!"):(a.sqlPortOpen=!0,e.print("Opened SQL Port (1433)!"),a.openPortCount++):e.error("Cannot run SQLInject.exe on this kind of server.")}},{key:"DeepscanV1",name:"DeepscanV1.exe",create:{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:p(75),time:n.a.MillisecondsPerQuarterHour},run:e=>{e.print("This executable cannot be run."),e.print("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}},{key:"DeepscanV2",name:"DeepscanV2.exe",create:{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:p(400),time:n.a.MillisecondsPer2Hours},run:e=>{e.print("This executable cannot be run."),e.print("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:p(75),time:n.a.MillisecondsPerHalfHour},run:(e,t,a,n)=>{if(1!==n.length)return void e.print("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const r=Object(s.b)(n[0]);null!=r?r instanceof i.a?e.print("ServerProfiler.exe cannot be run on a Hacknet Server."):(e.print(r.hostname+":"),e.print("Server base security level: "+r.baseDifficulty),e.print("Server current security level: "+r.hackDifficulty),e.print("Server growth rate: "+r.serverGrowth),e.print("Netscript hack() execution time: "+Object(o.b)(1e3*Object(h.d)(r,t),!0)),e.print("Netscript grow() execution time: "+Object(o.b)(1e3*Object(h.a)(r,t),!0)),e.print("Netscript weaken() execution time: "+Object(o.b)(1e3*Object(h.f)(r,t),!0))):e.print("Invalid server IP/hostname")}},{key:"AutoLink",name:"AutoLink.exe",create:{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:p(25),time:n.a.MillisecondsPerQuarterHour},run:e=>{e.print("This executable cannot be run."),e.print("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),e.print("When using scan-analyze, click on a server's hostname to connect to it.")}},{key:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(e){return e.sourceFiles.length>0&&e.hacking_skill>=1},time:n.a.MillisecondsPerFiveMinutes/20},run:(e,t)=>{Object(u.a)("bitflume-popup",m.a,{player:t,popupId:"bitflume-popup"})}},{key:"Flight",name:"fl1ght.exe",create:null,run:(e,t)=>{const a=Math.round(30*c.a.DaedalusAugsRequirement);if(!(t.augmentations.length>=a&&t.money.gt(1e11)&&t.hacking_skill>=2500))return e.print(`Augmentations: ${t.augmentations.length} / ${a}`),e.print(`Money: ${l.a.formatMoney(t.money.toNumber())} / $100b`),void e.print(`Hacking skill: ${t.hacking_skill} / 2500`);e.print("We will contact you."),e.print("-- Daedalus --")}}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(16);function r(e){let t=e;return t.startsWith("[")&&(t=t.slice(1)),t.endsWith("]")&&(t=t.slice(0,-1)),t}function i(e){let t=e;return(t.startsWith('"')||t.startsWith("'"))&&(t=t.slice(1)),(t.endsWith('"')||t.endsWith("'"))&&(t=t.slice(0,-1)),t}function o(e){const t=[];return e.forEach(e=>{let a=e.toString();a=["[",a,"]"].join(""),t.push(a)}),t.join(",").replace(/\s/g,"")}const s=[{desc:e=>["A prime factor is a factor that is a prime number.",`What is the largest prime factor of ${e}?`].join(" "),difficulty:1,gen:()=>Object(n.a)(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(e,t)=>{let a=2,n=e;for(;n>(a-1)*(a-1);){for(;n%a==0;)n=Math.round(n/a);++a}return(1===n?a-1:n)===parseInt(t,10)}},{desc:e=>["Given the following integer array, find the contiguous subarray","(containing at least one number) which has the largest sum and return that sum.","'Sum' refers to the sum of all the numbers in the subarray.\n",""+e.toString()].join(" "),difficulty:1,gen:()=>{const e=Object(n.a)(5,40),t=[];t.length=e;for(let a=0;a{const a=e.slice();for(let e=1;e["It is possible write four as a sum in exactly four different ways:\n\n","    3 + 1\n","    2 + 2\n","    2 + 1 + 1\n","    1 + 1 + 1 + 1\n\n",`How many different ways can the number ${e} be written as a sum of at least`,"two positive integers?"].join(" "),difficulty:1.5,gen:()=>Object(n.a)(8,100),name:"Total Ways to Sum",numTries:10,solver:(e,t)=>{const a=[1];a.length=e+1,a.fill(0,1);for(let t=1;t{let t=["Given the following array of array of numbers representing a 2D matrix,","return the elements of the matrix as an array in spiral order:\n\n"].join(" ");return t+="    [\n",t+=e.map(e=>"        ["+e.map(e=>(""+e).padStart(2," ")).join(",")+"]").join("\n"),t+="\n    ]\n",t+=["\nHere is an example of what spiral order should be:\n\n","    [\n","        [1, 2, 3]\n","        [4, 5, 6]\n","        [7, 8, 9]\n","    ]\n\n","Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n","Note that the matrix will not always be square:\n\n","    [\n","        [1,  2,  3,  4]\n","        [5,  6,  7,  8]\n","        [9, 10, 11, 12]\n","    ]\n\n","Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]"].join(" "),t},difficulty:2,gen:()=>{const e=Object(n.a)(1,15),t=Object(n.a)(1,15),a=[];a.length=e;for(let n=0;n{const a=[];let n=0,i=e.length-1,o=0,s=e[0].length-1,l=0;for(;;){for(let t=o;t<=s;t++)a[l]=e[n][t],++l;if(++n>i)break;for(let t=n;t<=i;t++)a[l]=e[t][s],++l;if(--s=o;t--)a[l]=e[i][t],++l;if(--i=n;t--)a[l]=e[t][o],++l;if(++o>s)break}const c=r(t).replace(/\s/g,"").split(",");for(let e=0;e["You are given the following array of integers:\n\n",e+"\n\n","Each element in the array represents your MAXIMUM jump length","at that position. This means that if you are at position i and your","maximum jump length is n, you can jump to any position from","i to i+n.","\n\nAssuming you are initially positioned","at the start of the array, determine whether you are","able to reach the last index exactly.\n\n","Your answer should be submitted as 1 or 0, representing true and false respectively"].join(" "),difficulty:2.5,gen:()=>{const e=Object(n.a)(3,25),t=[];t.length=e;for(let e=0;e{const a=e.length;let n=0;for(let t=0;n["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${o(e)}]\n\n`,"Example:\n\n","[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n","would merge into [[1, 6], [8, 16]].\n\n","The intervals must be returned in ASCENDING order.","You can assume that in an interval, the first number will always be","smaller than the second."].join(" "),difficulty:3,gen:()=>{const e=[],t=Object(n.a)(3,20);for(let a=0;a{const a=e.slice();a.sort((e,t)=>e[0]-t[0]);const n=[];let i=a[0][0],s=a[0][1];for(const e of a)e[0]<=s?s=Math.max(s,e[1]):(n.push([i,s]),i=e[0],s=e[1]);n.push([i,s]);const l=o(n),c=t.replace(/\s/g,"");return l===c||l===r(c)}},{desc:e=>["Given the following string containing only digits, return","an array with all possible valid IP address combinations","that can be created from the string:\n\n",e+"\n\n","Note that an octet cannot begin with a '0' unless the number","itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n","Examples:\n\n","25525511135 -> [255.255.11.135, 255.255.111.35]\n","1938718066 -> [193.87.180.66]"].join(" "),difficulty:3,gen:()=>{let e="";for(let t=0;t<4;++t){e+=Object(n.a)(0,255).toString()}return e},name:"Generate IP Addresses",numTries:10,solver:(e,t)=>{const a=[];for(let t=1;t<=3;++t)for(let n=1;n<=3;++n)for(let r=1;r<=3;++r)for(let i=1;i<=3;++i)if(t+n+r+i===e.length){const o=parseInt(e.substring(0,t),10),s=parseInt(e.substring(t,t+n),10),l=parseInt(e.substring(t+n,t+n+r),10),c=parseInt(e.substring(t+n+r,t+n+r+i),10);if(o<=255&&s<=255&&l<=255&&c<=255){const t=[o.toString(),".",s.toString(),".",l.toString(),".",c.toString()].join("");t.length===e.length+3&&a.push(t)}}const n=r(t).replace(/\s/g,"").split(",");if(n.length!==a.length)return!1;for(const e of n)if(!a.includes(e))return!1;return!0}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",e+"\n\n","Determine the maximum possible profit you can earn using at most","one transaction (i.e. you can only buy and sell the stock once). If no profit can be made","then the answer should be 0. Note","that you have to buy the stock before you can sell it"].join(" "),difficulty:1,gen:()=>{const e=Object(n.a)(3,50),t=[];t.length=e;for(let a=0;a{let a=0,n=0;for(let t=1;t["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",e+"\n\n","Determine the maximum possible profit you can earn using as many","transactions as you'd like. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:2,gen:()=>{const e=Object(n.a)(3,50),t=[];t.length=e;for(let a=0;a{let a=0;for(let t=1;t["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",e+"\n\n","Determine the maximum possible profit you can earn using at most","two transactions. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:5,gen:()=>{const e=Object(n.a)(3,50),t=[];t.length=e;for(let a=0;a{let a=Number.MIN_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER,r=0,i=0;for(const t of e)i=Math.max(i,n+t),n=Math.max(n,r-t),r=Math.max(r,a+t),a=Math.max(a,-1*t);return i.toString()===t}},{desc:e=>["You are given the following array with two elements:\n\n",`[${e[0]}, [${e[1]}]]\n\n`,"The first element is an integer k. The second element is an","array of stock prices (which are numbers) where the i-th element","represents the stock price on day i.\n\n","Determine the maximum possible profit you can earn using at most","k transactions. A transaction is defined as buying and then selling","one share of the stock. Note that you cannot engage in multiple","transactions at once. In other words, you must sell the stock before","you can buy it again.\n\n","If no profit can be made, then the answer should be 0."].join(" "),difficulty:8,gen:()=>{const e=Object(n.a)(2,10),t=Object(n.a)(3,50),a=[];a.length=t;for(let e=0;e{const a=e[0],n=e[1],r=n.length;if(r<2)return 0===parseInt(t);if(a>r/2){let e=0;for(let t=1;t0;--e)o[e]=Math.max(o[e],i[e]+s),i[e]=Math.max(i[e],o[e-1]-s)}return parseInt(t)===o[a]}},{desc:e=>{function t(e,a=0){const n=e.length;if(a>=n)return"";let r=[" ".repeat(n-a+1),"[",e[a].toString(),"]"].join("");return a 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const e=[],t=Object(n.a)(3,12);e.length=t;for(let a=0;a{const a=e.length,n=e[a-1].slice();for(let t=a-2;t>-1;--t)for(let a=0;a{const t=e[0],a=e[1];return["You are in a grid with",`${t} rows and ${a} columns, and you are`,"positioned in the top-left corner of that grid. You are trying to","reach the bottom-right corner of the grid, but you can only","move down or right on each step. Determine how many","unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an array","with the number of rows and columns:\n\n",`[${t}, ${a}]`].join(" ")},difficulty:3,gen:()=>[Object(n.a)(2,14),Object(n.a)(2,14)],name:"Unique Paths in a Grid I",numTries:10,solver:(e,t)=>{const a=e[0],n=e[1],r=[];r.length=a;for(let e=0;e{let t="";for(const a of e)t+=a.toString()+",\n";return["You are located in the top-left corner of the following grid:\n\n",t+"\n","You are trying reach the bottom-right corner of the grid, but you can only","move down or right on each step. Furthermore, there are obstacles on the grid","that you cannot move onto. These obstacles are denoted by '1', while empty","spaces are denoted by 0.\n\n","Determine how many unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an 2D array of numbers representing the grid."].join(" ")},difficulty:5,gen:()=>{const e=Object(n.a)(2,12),t=Object(n.a)(2,12),a=[];a.length=e;for(let n=0;n{const a=[];a.length=e.length;for(let t=0;t0?a[e-1][t]:0)+(t>0?a[e][t-1]:0);return a[a.length-1][a[0].length-1]===parseInt(t)}},{desc:e=>["Given the following string:\n\n",e+"\n\n","remove the minimum number of invalid parentheses in order to validate","the string. If there are multiple minimal ways to validate the string,","provide all of the possible results. The answer should be provided","as an array of strings. If it is impossible to validate the string","the result should be an array with only an empty string.\n\n","IMPORTANT: The string may contain letters, not just parentheses.","Examples:\n",'"()())()" -> [()()(), (())()]\n','"(a)())()" -> [(a)()(), (a())()]\n','")( -> [""]'].join(" "),difficulty:10,gen:()=>{const e=Object(n.a)(6,20),t=[];t.length=e,Math.random()<.8?t[0]="(":t[0]=")";for(let a=1;a{let a=0,n=0;const i=[];for(let t=0;t0?--a:++n);!function e(t,a,n,r,i,o,s){if(i.length!==a)"("===i[a]?(n>0&&e(t,a+1,n-1,r,i,o,s),e(t+1,a+1,n,r,i,o+i[a],s)):")"===i[a]?(r>0&&e(t,a+1,n,r-1,i,o,s),t>0&&e(t-1,a+1,n,r,i,o+i[a],s)):e(t,a+1,n,r,i,o+i[a],s);else if(0===n&&0===r&&0===t){for(let e=0;e{const t=e[0],a=e[1];return["You are given the following string which contains only digits between 0 and 9:\n\n",t+"\n\n",`You are also given a target number of ${a}. Return all possible ways`,"you can add the +, -, and * operators to the string such that it evaluates","to the target number.\n\n","The provided answer should be an array of strings containing the valid expressions.","The data provided by this problem is an array with two elements. The first element","is the string of digits, while the second element is the target number:\n\n",`["${t}", ${a}]\n\n`,"NOTE: Numbers in the expression cannot have leading 0's. In other words,",'"1+01" is not a valid expression',"Examples:\n\n",'Input: digits = "123", target = 6\n',"Output: [1+2+3, 1*2*3]\n\n",'Input: digits = "105", target = 5\n',"Output: [1*0+5, 10-5]"].join(" ")},difficulty:10,gen:()=>{const e=Object(n.a)(4,12),t=[];t.length=e;for(let e=0;e{const a=e[0],n=e[1];const o=r(t).split(",");for(let e=0;e"}}));return r.a.createElement("div",null,r.a.createElement(s.b,{value:e.c.type,tag:s.a.Tag_h1}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",null,"You are attempting to solve a Coding Contract. You have ",e.c.getMaxNumTries()-e.c.tries," tries remaining, after which the contract will self-destruct."),r.a.createElement("br",null),r.a.createElement("p",null,c),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input",style:{width:"50%",marginTop:"8px"},autoFocus:!0,placeholder:"Enter Solution here",value:t,onChange:function(e){a(e.target.value)},onKeyDown:function(a){const n=a.target.value;a.keyCode===i.a.ENTER&&""!==n&&(a.preventDefault(),e.onAttempt(t))}}),r.a.createElement("button",{className:"std-button",onClick:()=>e.onAttempt(t)},"Solve"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function r(e){let t="";for(let a=0;a({rerenderFlag:!e.rerenderFlag}))}routeToMain(){this.setState({purchasingAugs:!1})}routeToPurchaseAugs(){this.setState({purchasingAugs:!0})}sleevePurchases(){Object(u.d)(this.props.p)}startFieldWork(){this.props.p.startFactionFieldWork(this.props.faction)}startHackingContracts(){this.props.p.startFactionHackWork(this.props.faction)}startHackingMission(){const e=this.props.faction;this.props.p.singularityStopWork(),this.props.engine.loadMissionContent(),this.props.startHackingMissionFn(e)}startSecurityWork(){this.props.p.startFactionSecurityWork(this.props.faction)}render(){return this.state.purchasingAugs?this.renderAugmentationsPage():this.renderMainPage()}renderMainPage(){const e=this.props.p,t=this.props.faction,a=t.getInfo(),r=e.inGang()&&e.getGangName()===t.name,u=Math.floor(l.a.BaseFavorToDonate*c.a.RepToDonateToFaction),h=t.favor>=u,p="The Covenant"===t.name&&e.bitNodeN>=10&&m.a[10];let f=e.canAccessGang()&&d.includes(t.name);return e.inGang()&&(e.getGangName()!==t.name?f=!1:e.getGangName()===t.name&&(f=!0)),n.createElement("div",{className:"faction-container"},n.createElement("h1",null,t.name),n.createElement(o.a,{faction:t,factionInfo:a}),f&&n.createElement(s.a,{buttonText:"Manage Gang",infoText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",onClick:this.manageGang}),!r&&a.offerHackingMission&&n.createElement(s.a,{buttonText:"Hacking Mission",infoText:"Attempt a hacking mission for your faction. A mission is a mini game that, if won, earns you significant reputation with this faction. (Recommended hacking level: 200+)",onClick:this.startHackingMission}),!r&&a.offerHackingWork&&n.createElement(s.a,{buttonText:"Hacking Contracts",infoText:"Complete hacking contracts for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your hacking skill. You will gain hacking exp.",onClick:this.startHackingContracts}),!r&&a.offerFieldWork&&n.createElement(s.a,{buttonText:"Field Work",infoText:"Carry out field missions for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on all of your stats. You will gain exp for all stats.",onClick:this.startFieldWork}),!r&&a.offerSecurityWork&&n.createElement(s.a,{buttonText:"Security Work",infoText:"Serve in a security detail for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your combat stats. You will gain exp for all combat stats.",onClick:this.startSecurityWork}),!r&&a.offersWork()&&n.createElement(i.a,{faction:this.props.faction,p:this.props.p,rerender:this.rerender,favorToDonate:u,disabled:!h}),n.createElement(s.a,{buttonText:"Purchase Augmentations",infoText:"As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.",onClick:this.routeToPurchaseAugs}),p&&n.createElement(s.a,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:"Purchase Duplicate Sleeves and upgrades. These are permanent!",onClick:this.sleevePurchases}))}renderAugmentationsPage(){return n.createElement(n.Fragment,null,n.createElement(r.a,{faction:this.props.faction,p:this.props.p,routeToMainPage:this.routeToMain}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(629),i=a(18),o=a(4),s=a(136),l=a(33),c=a(22);const u={width:"70%"};class m extends n.Component{constructor(e){super(e),this.isPlayersGang=e.p.inGang()&&e.p.getGangName()===e.faction.name,this.state={rerenderFlag:!1,sortOrder:s.b.Default},this.rerender=this.rerender.bind(this)}getAugs(){if(this.isPlayersGang){const e=[];for(const t in i.a){i.a[t].isSpecial||e.push(t)}return e}return this.props.faction.augmentations.slice()}getAugsSorted(){switch(l.a.PurchaseAugmentationsOrder){case s.b.Cost:return this.getAugsSortedByCost();case s.b.Reputation:return this.getAugsSortedByReputation();default:return this.getAugsSortedByDefault()}}getAugsSortedByCost(){const e=this.getAugs();return e.sort((e,t)=>{const a=i.a[e],n=i.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseCost-n.baseCost}),e}getAugsSortedByReputation(){const e=this.getAugs();return e.sort((e,t)=>{const a=i.a[e],n=i.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseRepRequirement-n.baseRepRequirement}),e}getAugsSortedByDefault(){return this.getAugs()}switchSortOrder(e){l.a.PurchaseAugmentationsOrder=e,this.rerender()}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=this.getAugsSorted(),t=e.filter(e=>e===o.a.NeuroFluxGovernor||!this.props.p.augmentations.some(t=>t.name===e)&&!this.props.p.queuedAugmentations.some(t=>t.name===e)),a=e=>n.createElement(r.a,{augName:e,faction:this.props.faction,key:e,p:this.props.p,rerender:this.rerender}),i=t.map(e=>a(e));let l=n.createElement(n.Fragment,null);const m=e.filter(e=>!t.includes(e));return 0!==m.length&&(l=n.createElement(n.Fragment,null,n.createElement("br",null),n.createElement("h2",null,"Purchased Augmentations"),n.createElement("p",{style:u},"This factions also offers these augmentations but you already own them."),m.map(e=>a(e)))),n.createElement("div",null,n.createElement(c.a,{onClick:this.props.routeToMainPage,text:"Back"}),n.createElement("h1",null,"Faction Augmentations"),n.createElement("p",{style:u},"These are all of the Augmentations that are available to purchase from ",this.props.faction.name,". Augmentations are powerful upgrades that will enhance your abilities."),n.createElement(c.a,{onClick:()=>this.switchSortOrder(s.b.Cost),text:"Sort by Cost"}),n.createElement(c.a,{onClick:()=>this.switchSortOrder(s.b.Reputation),text:"Sort by Reputation"}),n.createElement(c.a,{onClick:()=>this.switchSortOrder(s.b.Default),text:"Sort by Default Order"}),n.createElement("br",null),i,l,n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(84),i=a(630),o=a(18),s=a(4),l=a(33),c=a(11),u=a(75),m=a(17),h=a(22),p=a(631);class d extends n.Component{constructor(e){super(e);const t=o.a[this.props.augName];if(null==t)throw new Error(`aug ${this.props.augName} does not exists`);this.aug=t,this.handleClick=this.handleClick.bind(this)}getMoneyCost(){return this.aug.baseCost*this.props.faction.getInfo().augmentationPriceMult}getRepCost(){return this.aug.baseRepRequirement*this.props.faction.getInfo().augmentationRepRequirementMult}handleClick(){if(l.a.SuppressBuyAugmentationConfirmation)Object(r.g)(this.aug,this.props.faction);else{const e="purchase-augmentation-popup";Object(m.a)(e,i.a,{aug:this.aug,faction:this.props.faction,player:this.props.p,popupId:e})}}hasPrereqs(){return Object(r.c)(this.aug)}hasReputation(){return this.props.faction.playerReputation>=this.getRepCost()}owned(){let e=!1;for(const t of this.props.p.queuedAugmentations)if(t.name===this.props.augName){e=!0;break}for(const t of this.props.p.augmentations)if(t.name===this.props.augName){e=!0;break}return e}render(){if(null==this.aug)return console.error("Invalid Augmentation when trying to create PurchaseableAugmentation display element: "+this.props.augName),null;const e=this.getMoneyCost(),t=this.getRepCost();let a=!1,i=n.createElement(n.Fragment,null),o="";this.hasPrereqs()?this.aug.name!==s.a.NeuroFluxGovernor&&(this.aug.owned||this.owned())?a=!0:this.hasReputation()?i=n.createElement(n.Fragment,null,"UNLOCKED (at ",Object(u.a)(t)," faction reputation) - ",n.createElement(c.a,{money:e,player:this.props.p})):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",Object(u.a)(t)," faction reputation - ",n.createElement(c.a,{money:e,player:this.props.p}),")"),o="red"):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",this.aug.prereqs.map(e=>Object(p.a)(e))," as prerequisite)"),o="red");const l={display:"inline-block"};""!==o&&(l.color=o);let m=this.aug.name;this.aug.name===s.a.NeuroFluxGovernor&&(m+=" - Level "+Object(r.b)());let d=n.createElement(n.Fragment,null);return d="string"==typeof this.aug.info?n.createElement(n.Fragment,null,n.createElement("span",{dangerouslySetInnerHTML:{__html:this.aug.info}}),n.createElement("br",null),n.createElement("br",null),this.aug.stats):n.createElement(n.Fragment,null,this.aug.info,n.createElement("br",null),n.createElement("br",null),this.aug.stats),n.createElement("li",{key:this.aug.name},n.createElement("span",{style:{margin:"4px",padding:"4px"}},n.createElement(h.a,{disabled:a,onClick:this.handleClick,style:{display:"inline-block"},text:m,tooltip:d}),n.createElement("p",{style:l},i)))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(84),o=a(123),s=a(11),l=a(17);function c(e){const t=e.faction.getInfo();return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null,e.aug.name),r.a.createElement("br",null),e.aug.info,r.a.createElement("br",null),r.a.createElement("br",null),e.aug.stats,r.a.createElement("br",null),r.a.createElement("br",null),"Would you like to purchase the ",e.aug.name," Augmentation for ",r.a.createElement(s.a,{money:e.aug.baseCost*t.augmentationPriceMult}),"?",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("button",{autoFocus:!0,className:"std-button",onClick:function(){!Object(o.e)(e.aug)&&e.player.hasAugmentation(e.aug)||(Object(i.g)(e.aug,e.faction),Object(l.b)(e.popupId))}},"Purchase"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);function r(e){return n.createElement("span",{className:"samefont",style:{color:"white"}},e)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(5),o=a(498),s=a(11),l=a(75),c=a(22),u=a(2),m=a(9),h=a(194);const p={margin:"5px",height:"26px"};function d(e){const[t,a]=Object(n.useState)(null),d=(i.a.DonateMoneyToRepDivisor+"").length-1;function f(){return null!==t&&(!(isNaN(t)||t<=0)&&!e.p.money.lt(t))}return r.a.createElement("div",{className:"faction-work-div"},r.a.createElement("div",{className:"faction-work-div-wrapper"},r.a.createElement("input",{className:"text-input",onChange:function(e){const t=u.a.parseMoney(e.target.value);""===e.target.value||isNaN(t)?a(null):a(t)},placeholder:"Donation amount",style:p,disabled:e.disabled}),r.a.createElement(c.a,{onClick:function(){const a=e.faction,n=t;if(null===n)return;if(!f())return;e.p.loseMoney(n);const i=Object(o.a)(n,e.p);e.faction.playerReputation+=i,Object(m.a)(r.a.createElement(r.a.Fragment,null,"You just donated ",r.a.createElement(s.a,{money:n})," to ",a.name," to gain ",Object(l.a)(i)," reputation.")),e.rerender()},text:"Donate Money",disabled:e.disabled||!f()}),r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):f()?r.a.createElement("p",null,"This donation will result in ",Object(l.a)(Object(o.a)(t,e.p))," reputation gain"):e.p.money.lt(t)?r.a.createElement("p",null,"Insufficient funds"):r.a.createElement("p",null,"Invalid donate amount entered!")}),null),e.disabled?r.a.createElement("p",null,"Unlocked at ",e.favorToDonate," favor with ",e.faction.name):r.a.createElement("div",{className:"text"},r.a.createElement(h.a,{tex:String.raw`reputation = \frac{\text{donation amount} \times \text{reputation multiplier}}{10^{${d}}}`}))))}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(638),i=a(639),o=a(75),s=a(337),l=a(194);const c={display:"block"},u={display:"block",width:"70%"};class m extends n.Component{constructor(e){super(e),this.getFavorGainContent=this.getFavorGainContent.bind(this),this.getReputationContent=this.getReputationContent.bind(this)}getFavorGainContent(){const e=this.props.faction.getFavorGain()[0];return n.createElement(n.Fragment,null,"You will have ",Object(s.a)(this.props.faction.favor+e)," faction favor after installing an Augmentation.",n.createElement(l.a,{tex:String.raw`\large{r = \text{total faction reputation}}`}),n.createElement(l.a,{tex:String.raw`\large{favor=\left\lfloor\log_{1.02}\left(\frac{r+25000}{25500}\right)\right\rfloor}`}))}getReputationContent(){return n.createElement(n.Fragment,null,"Reputation: ",Object(o.a)(this.props.faction.playerReputation))}render(){const e=n.createElement(n.Fragment,null,"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you install an Augmentation. The amount of favor you gain depends on the total amount of reputation you earned with this faction. Across all resets.",n.createElement(l.a,{tex:String.raw`\large{r = reputation}`}),n.createElement(l.a,{tex:String.raw`\large{\Delta r = \Delta r \times \frac{100+favor}{100}}`})),t={__html:this.props.factionInfo.infoText};return n.createElement("div",null,n.createElement("pre",null,n.createElement("i",{className:"text",dangerouslySetInnerHTML:t})),n.createElement("p",{style:c},"-------------------------"),n.createElement(r.a,{intervalTime:5e3,getContent:this.getReputationContent,getTooltip:this.getFavorGainContent}),n.createElement("p",{style:c},"-------------------------"),n.createElement(i.a,{content:n.createElement(n.Fragment,null,"Faction Favor: ",Object(s.a)(this.props.faction.favor)),tooltip:e}),n.createElement("p",{style:c},"-------------------------"),n.createElement("p",{style:u},"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities."))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);class r extends n.Component{constructor(e){var t,a,n;super(e),n=0,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}hasTooltip(){return null==this.props.getTooltip||!!this.props.getTooltip()}tooltip(){return this.props.getTooltip?this.props.getTooltip():n.createElement(n.Fragment,null)}render(){return n.createElement("div",{className:"tooltip",style:this.props.style},n.createElement("p",null,this.props.getContent()),this.hasTooltip()&&n.createElement("span",{className:"tooltiptext"},this.tooltip()))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);class r extends n.Component{render(){return n.createElement("div",{className:"tooltip",style:this.props.style},n.createElement("p",null,this.props.content),n.createElement("span",{className:"tooltiptext"},this.props.tooltip))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(641),o=a(239),s=a(277),l=a(644),c=a(22),u=a(11),m=a(9);function h(){return(h=Object.assign||function(e){for(var t=1;t=s.b&&(f=!0);const g=[];for(let t=0;t=s.b||(e.p.canAfford(p())?(e.p.loseMoney(p()),e.p.sleevesFromCovenant+=1,e.p.sleeves.push(new o.a(e.p)),d()):Object(m.a)("You cannot afford to purchase a Duplicate Sleeve",!1))},text:"Purchase"}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",null,"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes."),g)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(642);class i extends n.Component{render(){return n.createElement("div",{className:"bladeburner-action"},n.createElement("h1",null,"Duplicate Sleeve ",this.props.index),n.createElement(r.a,this.props))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(2),i=a(22),o=a(11);class s extends n.Component{constructor(e){super(e),this.state={amt:1},this.changePurchaseAmount=this.changePurchaseAmount.bind(this),this.purchaseMemory=this.purchaseMemory.bind(this)}changePurchaseAmount(e){let t=parseInt(e.target.value);isNaN(t)&&(t=1);const a=100-this.props.sleeve.memory;t>a&&(t=a),this.setState({amt:t})}getPurchaseCost(){if(isNaN(this.state.amt))return 1/0;const e=100-this.props.sleeve.memory;return this.state.amt>e?1/0:this.props.sleeve.getMemoryUpgradeCost(this.state.amt)}purchaseMemory(){const e=this.getPurchaseCost();this.props.p.canAfford(e)&&(this.props.sleeve.upgradeMemory(this.state.amt),this.props.p.loseMoney(e),this.props.rerender())}render(){const e=`sleeve-${this.props.index}-memory-upgrade-input`,t=100-this.props.sleeve.memory,a=this.getPurchaseCost(),s=!this.props.p.canAfford(a);let l;return l=isNaN(this.state.amt)?n.createElement(n.Fragment,null,"Invalid value"):this.state.amt>t?n.createElement(n.Fragment,null,"Memory cannot exceed 100"):n.createElement(n.Fragment,null,"Purchase ",this.state.amt," memory - ",n.createElement(o.a,{money:a,player:this.props.p}),"?"),n.createElement("div",null,n.createElement("h2",null,n.createElement("u",null,"Upgrade Memory")),n.createElement("p",null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:"," ",r.a.formatSleeveMemory(this.props.sleeve.memory),")"),n.createElement("label",{htmlFor:e},"Amount of memory to purchase (must be an integer):"),n.createElement("input",{className:"text-input",id:e,onChange:this.changePurchaseAmount,type:"number",value:this.state.amt}),n.createElement("br",null),n.createElement(i.a,{disabled:s,onClick:this.purchaseMemory,text:l}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(23);const r=[{name:n.j[0],nextPosition:n.j[1],baseSalary:33,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.05,reqdHacking:1,repMultiplier:.9},{name:n.j[1],nextPosition:n.j[2],baseSalary:80,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.1,reqdHacking:51,reqdReputation:8e3,repMultiplier:1.1},{name:n.j[2],nextPosition:n.j[3],baseSalary:165,charismaEffectiveness:20,charismaExpGain:.08,hackingEffectiveness:80,hackingExpGain:.4,reqdCharisma:51,reqdHacking:251,reqdReputation:4e4,repMultiplier:1.3},{name:n.j[3],nextPosition:n.j[4],baseSalary:500,charismaEffectiveness:25,charismaExpGain:.1,hackingEffectiveness:75,hackingExpGain:.8,reqdCharisma:151,reqdHacking:401,reqdReputation:2e5,repMultiplier:1.5},{name:n.j[4],nextPosition:n.j[5],baseSalary:800,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1,reqdCharisma:251,reqdHacking:501,reqdReputation:4e5,repMultiplier:1.6},{name:n.j[5],nextPosition:n.j[6],baseSalary:1650,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1.1,reqdCharisma:251,reqdHacking:501,reqdReputation:8e5,repMultiplier:1.6},{name:n.j[6],nextPosition:n.j[7],baseSalary:2310,charismaEffectiveness:30,charismaExpGain:.6,hackingEffectiveness:70,hackingExpGain:1.2,reqdCharisma:401,reqdHacking:601,reqdReputation:16e5,repMultiplier:1.75},{name:n.j[7],nextPosition:null,baseSalary:2640,charismaEffectiveness:35,charismaExpGain:1,hackingEffectiveness:65,hackingExpGain:1.5,reqdCharisma:501,reqdHacking:751,reqdReputation:32e5,repMultiplier:2},{name:n.d[0],nextPosition:n.d[1],baseSalary:26,charismaEffectiveness:10,charismaExpGain:.01,hackingEffectiveness:90,hackingExpGain:.04,reqdHacking:1,repMultiplier:.9},{name:n.d[1],nextPosition:n.d[2],baseSalary:66,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.08,reqdHacking:26,reqdReputation:7e3,repMultiplier:1.1},{name:n.d[2],nextPosition:n.d[3],baseSalary:132,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.3,reqdCharisma:51,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.3},{name:n.d[3],nextPosition:n.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.2,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.4},{name:n.i[0],nextPosition:n.j[5],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:n.f[0],nextPosition:n.f[1],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:n.f[1],nextPosition:n.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.3},{name:n.b[0],nextPosition:n.b[1],baseSalary:46,charismaEffectiveness:90,charismaExpGain:.08,hackingEffectiveness:10,hackingExpGain:.01,reqdCharisma:1,reqdHacking:1,repMultiplier:.9},{name:n.b[1],nextPosition:n.b[2],baseSalary:100,charismaEffectiveness:85,charismaExpGain:.15,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:51,reqdHacking:6,reqdReputation:8e3,repMultiplier:1.1},{name:n.b[2],nextPosition:n.b[3],baseSalary:200,charismaEffectiveness:85,charismaExpGain:.3,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:101,reqdHacking:51,reqdReputation:4e4,repMultiplier:1.3},{name:n.b[3],nextPosition:n.b[4],baseSalary:660,charismaEffectiveness:85,charismaExpGain:.4,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:226,reqdHacking:51,reqdReputation:2e5,repMultiplier:1.5},{name:n.b[4],nextPosition:n.b[5],baseSalary:1950,charismaEffectiveness:90,charismaExpGain:1,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:501,reqdHacking:76,reqdReputation:8e5,repMultiplier:1.6},{name:n.b[5],nextPosition:null,baseSalary:3900,charismaEffectiveness:90,charismaExpGain:1.5,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:751,reqdHacking:101,reqdReputation:32e5,repMultiplier:1.75},{name:n.h[0],nextPosition:n.h[1],baseSalary:82,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.04,reqdHacking:11,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1},{name:n.h[1],nextPosition:null,baseSalary:460,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.1,reqdHacking:101,reqdStrength:301,reqdDefense:301,reqdDexterity:301,reqdAgility:301,reqdCharisma:151,reqdReputation:36e3,repMultiplier:1.25},{name:n.h[2],nextPosition:n.h[3],baseSalary:50,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.01,strengthExpGain:.04,defenseExpGain:.04,dexterityExpGain:.04,agilityExpGain:.04,charismaExpGain:.02,reqdStrength:51,reqdDefense:51,reqdDexterity:51,reqdAgility:51,reqdCharisma:1,repMultiplier:1},{name:n.h[3],nextPosition:n.h[4],baseSalary:195,hackingEffectiveness:10,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:10,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.05,reqdHacking:26,reqdStrength:151,reqdDefense:151,reqdDexterity:151,reqdAgility:151,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1.1},{name:n.h[4],nextPosition:n.h[5],baseSalary:660,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.02,strengthExpGain:.12,defenseExpGain:.12,dexterityExpGain:.12,agilityExpGain:.12,charismaExpGain:.1,reqdHacking:26,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:101,reqdReputation:36e3,repMultiplier:1.25},{name:n.h[5],nextPosition:null,baseSalary:1320,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.05,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.15,reqdHacking:51,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:151,reqdReputation:144e3,repMultiplier:1.4},{name:n.a[0],nextPosition:n.a[1],baseSalary:330,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:20,hackingExpGain:.04,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.05,reqdHacking:101,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:101,reqdReputation:8e3,repMultiplier:1},{name:n.a[1],nextPosition:n.a[2],baseSalary:990,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.1,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.1,reqdHacking:201,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:201,reqdReputation:32e3,repMultiplier:1.25},{name:n.a[2],nextPosition:null,baseSalary:2e3,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.15,strengthExpGain:.2,defenseExpGain:.2,dexterityExpGain:.2,agilityExpGain:.2,charismaExpGain:.15,reqdHacking:251,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:251,reqdReputation:162e3,repMultiplier:1.5},{name:n.e[0],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.05,repMultiplier:1},{name:n.e[1],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.04,repMultiplier:1},{name:n.k[0],nextPosition:n.k[1],baseSalary:66,hackingEffectiveness:80,charismaEffectiveness:20,hackingExpGain:.08,charismaExpGain:.03,reqdHacking:51,repMultiplier:1},{name:n.k[1],nextPosition:null,baseSalary:132,hackingEffectiveness:75,charismaEffectiveness:25,hackingExpGain:.25,charismaExpGain:.06,reqdHacking:251,reqdCharisma:51,repMultiplier:1.2},{name:n.c[0],nextPosition:n.c[1],baseSalary:66,hackingEffectiveness:20,charismaEffectiveness:80,hackingExpGain:.015,charismaExpGain:.15,reqdHacking:6,reqdCharisma:51,repMultiplier:1},{name:n.c[1],nextPosition:null,baseSalary:525,hackingEffectiveness:15,charismaEffectiveness:85,hackingExpGain:.015,charismaExpGain:.3,reqdHacking:51,reqdCharisma:226,repMultiplier:1.2},{name:n.g[0],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.04,repMultiplier:1},{name:n.g[1],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.03,repMultiplier:1}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(52),i=a(324),o=a(645);class s extends o.a{constructor(e){super(e),this.closePopup=this.closePopup.bind(this)}closePopup(){let e;this.props.onClose&&this.props.onClose(),e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup,e instanceof HTMLElement&&(r.unmountComponentAtNode(e),Object(i.a)(e))}render(){const e=this.props.class?this.props.class:"std-button";return n.createElement("button",{className:e,onClick:this.closePopup,style:this.props.style},this.props.text)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(52),i=a(73),o=a(324);class s extends n.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.keyListener=this.keyListener.bind(this)}componentDidMount(){document.addEventListener("keydown",this.keyListener)}componentWillUnmount(){document.removeEventListener("keydown",this.keyListener)}handleClick(){let e;this.props.onClose&&this.props.onClose(),e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup,e instanceof HTMLElement&&(r.unmountComponentAtNode(e),Object(o.a)(e))}keyListener(e){e.keyCode===i.a.ESC&&this.handleClick()}render(){const e=this.props.class?this.props.class:"std-button";return n.createElement("button",{className:e,onClick:this.handleClick,style:this.props.style},this.props.text)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(22);function s(e){function t(){return["NiteSec","The Black Hand"].includes(e.facName)}function a(){e.p.startGang(e.facName,t()),Object(i.b)(e.popupId),e.engine.loadGangContent()}return r.a.createElement(r.a.Fragment,null,"Would you like to create a new Gang with ",e.facName,"?",r.a.createElement("br",null),r.a.createElement("br",null),"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.",r.a.createElement("br",null),r.a.createElement("br",null),t()?"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare is not as important.":"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. Compared to hacking gangs, progression with combat gangs can be more difficult as territory management is more important. However, well-managed combat gangs can progress faster than hacking ones.",r.a.createElement("br",null),r.a.createElement("br",null),"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.",r.a.createElement("div",{className:"popup-box-input-div"},r.a.createElement(o.a,{onClick:a,onKeyUp:function(e){13===e.keyCode&&a()},text:"Create Gang",style:{float:"right"},autoFocus:!0})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(84),o=a(17);function s(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"You have received a faction invitation."),r.a.createElement("p",null,"Would you like to join ",e.faction.name,"? ",r.a.createElement("br",null),r.a.createElement("br",null),"Warning: Joining this faction may prevent you from joining other factions during this run!"),r.a.createElement("button",{className:"std-button",onClick:function(){-1===e.player.factionInvitations.findIndex(t=>t===e.faction.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(i.e)(e.faction),Object(o.b)(e.popupId)}},"Join!"),r.a.createElement("button",{className:"std-button",onClick:()=>Object(o.b)(e.popupId)},"Decide later"))}},function(e,t,a){"use strict";function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}a.d(t,"a",(function(){return r}));class r{constructor(e){n(this,"costPerLevel",0),n(this,"desc",""),n(this,"hasTargetServer",!1),n(this,"name",""),n(this,"value",0),n(this,"effectText",()=>null),null!=e.cost&&(this.cost=e.cost),null!=e.effectText&&(this.effectText=e.effectText),this.costPerLevel=e.costPerLevel,this.desc=e.desc,this.hasTargetServer=!!e.hasTargetServer&&e.hasTargetServer,this.name=e.name,this.value=e.value}getCost(e){return"number"==typeof this.cost?this.cost:Math.round((e+1)*this.costPerLevel)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(2),o=a(11);const s=[{cost:4,costPerLevel:4,desc:"Sell hashes for $1m",name:"Sell for Money",effectText:e=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e6*e})),value:1e6},{costPerLevel:100,desc:"Sell hashes for $1b in Corporation funds",name:"Sell for Corporation Funds",effectText:e=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e9*e})," Corporation funds."),value:1e9},{costPerLevel:50,desc:"Use hashes to decrease the minimum security of a single server by 2%. Note that a server's minimum security cannot go below 1. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Reduce Minimum Security",value:.98},{costPerLevel:50,desc:"Use hashes to increase the maximum amount of money on a single server by 2%. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Increase Maximum Money",value:1.02},{costPerLevel:50,desc:"Use hashes to improve the experience earned when studying at a university by 20%. This effect persists until you install Augmentations",name:"Improve Studying",effectText:e=>r.a.createElement(r.a.Fragment,null,"Improves studying by ",20*e,"%"),value:20},{costPerLevel:50,desc:"Use hashes to improve the experience earned when training at the gym by 20%. This effect persists until you install Augmentations",name:"Improve Gym Training",effectText:e=>r.a.createElement(r.a.Fragment,null,"Improves training by ",20*e,"%"),value:20},{costPerLevel:200,desc:"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries",name:"Exchange for Corporation Research",effectText:e=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",e,"k Scientific Research in your industries."),value:1e3},{costPerLevel:250,desc:"Exchange hashes for 100 Bladeburner Rank",name:"Exchange for Bladeburner Rank",effectText:e=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(100*e,"0a")," Bladeburner rank"),value:100},{costPerLevel:250,desc:"Exchanges hashes for 10 Bladeburner Skill Points",name:"Exchange for Bladeburner SP",effectText:e=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(10*e,"0a")," Bladeburner Skill Points"),value:10},{costPerLevel:200,desc:"Generate a random Coding Contract somewhere on the network",name:"Generate Coding Contract",effectText:e=>r.a.createElement(r.a.Fragment,null,"Generated ",e," contracts."),value:1}]},function(e,t,a){"use strict";function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}a.d(t,"a",(function(){return r}));class r{constructor(e){n(this,"parent",null),n(this,"stopFlag",!1),n(this,"vars",{}),e instanceof r&&(this.vars=Object.assign({},e.vars)),this.parent=e}lookup(e){let t=this;for(;t;){if(Object.prototype.hasOwnProperty.call(t.vars,e))return t;t=t.parent}return null}get(e){if(e in this.vars)return this.vars[e];throw new Error("Undefined variable "+e)}set(e,t){const a=this.lookup(e);return null!==a?a.vars[e]=t:this.vars[e]=t}def(e,t){return this.vars[e]=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return se}));var n=a(243),r=a(85),i=a(122),o=a(55),s=a(76),l=a(83),c=a(5),u=a(27),m=a(88),h=a(370),p=a(208),d=a(49),f=a(166),g=a(371),y=a(35),b=a(499),E=a(51),v=a(33),k=a(140),_=a(78),C=a(2),w=a(12),S=a(652),x=a(653),O=a(654),T=a(655),M=a(656),P=a(657),A=a(658),R=a(659),N=a(660),I=a(663),j=a(500),F=a(664),D=a(665),B=a(666),L=a(667),G=a(668),W=a(669),H=a(670),U=a(501),q=a(671),K=a(672),$=a(673),z=a(674),Y=a(675),V=a(676),J=a(502),Q=a(503),X=a(679),Z=a(680),ee=a(681),te=a(682),ae=a(683),ne=a(684),re=a(685),ie=a(686);function oe(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class se{constructor(){oe(this,"hasChanges",!1),oe(this,"action",null),oe(this,"commandHistory",[]),oe(this,"commandHistoryIndex",0),oe(this,"outputHistory",[new n.b("Bitburner v"+c.a.Version,"primary")]),oe(this,"contractOpen",!1),oe(this,"currDir","/")}process(e,t){null!==this.action&&(this.action.timeLeft-=c.a._idleSpeed*t/1e3,this.hasChanges=!0,this.action.timeLeft<0&&this.finishAction(e,!1))}pollChanges(){return!!this.hasChanges&&(this.hasChanges=!1,!0)}append(e){this.outputHistory.push(e),this.outputHistory.length>v.a.MaxTerminalCapacity&&this.outputHistory.slice(this.outputHistory.length-v.a.MaxTerminalCapacity)}print(e){this.append(new n.b(e,"primary")),this.hasChanges=!0}error(e){this.append(new n.b(e,"error")),this.hasChanges=!0}startHack(e){this.startAction(Object(_.d)(e.getCurrentServer(),e)/4,"h")}startBackdoor(e){this.startAction(Object(_.d)(e.getCurrentServer(),e)/4,"b")}startAnalyze(){this.print("Analyzing system..."),this.startAction(1,"a")}startAction(e,t){this.action=new n.c(e,t)}finishHack(e,t=!1){if(t)return;const a=e.getCurrentServer(),n=Object(_.b)(a,e),r=Math.random(),o=Object(_.c)(a,e),s=o/4;if(r=n.getMaxNumTries()?(this.print("Contract

FAILED

- Contract is now self-destructing"),a.removeContract(n)):this.print(`Contract

FAILED

- ${n.getMaxNumTries()-n.tries} tries remaining`);break;case s.b.Cancelled:default:this.print("Contract cancelled")}this.contractOpen=!1}executeScanAnalyzeCommand(e,t=1,a=!1){this.print("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),this.print(" ");const i={};for(const e in u.b)i[e]=0;const s=[],l=[0],c=e.getCurrentServer();for(s.push(c);0!=s.length;){const c=s.pop();if(!c)continue;const u=l.pop();if(void 0===u)continue;const m=c instanceof r.a;if(!a&&c.purchasedByPlayer&&"home"!=c.hostname)continue;if(i[c.ip]||u>t)continue;if(!a&&m)continue;i[c.ip]=1;for(let e=c.serversOnNetwork.length-1;e>=0;--e){const t=Object(y.c)(c,e);null!==t&&(s.push(t),l.push(u+1))}if(0==u)continue;const h=Array(4*(u-1)+1).join("-");e.hasProgram(o.a.AutoLink.name)?this.append(new n.a(c.hostname)):this.print(c.hostname);const p=h+"--";let d="NO";c.hasAdminRights&&(d="YES"),this.print(`${p}Root Access: ${d}${m?"":", Required hacking skill: "+c.requiredHackingSkill}`),c.hasOwnProperty("numOpenPortsRequired")&&this.print(p+"Number of open ports required to NUKE: "+c.numOpenPortsRequired),this.print(p+"RAM: "+C.a.formatRAM(c.maxRam)),this.print(" ")}const m=document.getElementsByClassName("scan-analyze-link");for(let t=0;t{const a=m[t].innerHTML.toString();m[t].addEventListener("onclick",()=>{null===this.action&&this.connectToServer(e,a)})})()}connectToServer(e,t){const a=Object(y.b)(t);null!=a?(e.getCurrentServer().isConnectedTo=!1,e.currentServer=a.ip,e.getCurrentServer().isConnectedTo=!0,this.print("Connected to "+a.hostname),this.setcwd("/"),"darkweb"==e.getCurrentServer().hostname&&Object(h.b)()):this.error("Invalid server. Connection failed.")}executeCommands(e,t,a){a=(a=a.trim()).replace(/\s\s+/g," "),this.commandHistory[this.commandHistory.length-1]!=a&&(this.commandHistory.push(a),this.commandHistory.length>50&&this.commandHistory.splice(0,1)),this.commandHistoryIndex=this.commandHistory.length;const n=Object(b.b)(a);for(let a=0;athis.print(e)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalLs:1===n.length&&"ls"==n[0]?(Object(U.a)(this,e,t,r,n.slice(1)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalScan:1===n.length&&"scan"==n[0]?(Object(Q.a)(this,e,t,r,n.slice(1)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalScanAnalyze1:1==n.length&&"scan-analyze"==n[0]?(this.executeScanAnalyzeCommand(t,1),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalScanAnalyze2:2==n.length&&"scan-analyze"==n[0]&&2===n[1]?(this.executeScanAnalyzeCommand(t,2),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalConnect:if(2==n.length){if("connect"!=n[0]||"n00dles"!=n[1]&&n[1]!=a.ip)return void this.print("Wrong command! Try again!");t.getCurrentServer().isConnectedTo=!1,t.currentServer=a.ip,t.getCurrentServer().isConnectedTo=!0,this.print("Connected to n00dles"),Object(d.b)()}else this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalAnalyze:if(1===n.length&&"analyze"===n[0]){if(1!==n.length)return void this.print("Incorrect usage of analyze command. Usage: analyze");this.startAnalyze(),Object(d.b)()}else this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalNuke:2==n.length&&"run"==n[0]&&"NUKE.exe"==n[1]?(a.hasAdminRights=!0,this.print("NUKE successful! Gained root access to n00dles"),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalManualHack:1==n.length&&"hack"==n[0]?(this.startHack(t),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalCreateScript:2==n.length&&"nano"==n[0]&&"n00dles.script"==n[1]?(e.loadScriptEditorContent("n00dles.script",""),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalFree:1==n.length&&"free"==n[0]?(Object(j.a)(this,e,t,r,n.slice(1)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalRunScript:2==n.length&&"run"==n[0]&&"n00dles.script"==n[1]?(Object(J.a)(this,e,t,r,n.slice(1)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.ActiveScriptsToTerminal:if(2==n.length&&"tail"==n[0]&&"n00dles.script"==n[1]){const e=Object(f.a)("n00dles.script",[],t.getCurrentServer());if(null==e)return void this.print("Error: No such script exists");Object(p.a)(e),Object(d.b)()}else this.print("Bad command. Please follow the tutorial");break;default:return void this.print("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}return}const i=n[0];if("number"==typeof i)return void this.error(`Command ${n[0]} not found`);const o={alias:S.a,analyze:x.a,backdoor:O.a,buy:T.a,cat:M.a,cd:P.a,check:A.a,cls:()=>this.clear(),clear:()=>this.clear(),connect:R.a,download:N.a,expr:I.a,free:j.a,hack:F.a,help:D.a,home:B.a,hostname:L.a,ifconfig:G.a,kill:W.a,killall:H.a,ls:U.a,lscpu:q.a,mem:K.a,mv:$.a,nano:z.a,ps:Y.a,rm:V.a,run:J.a,scan:Q.a,"scan-analyze":X.a,scp:Z.a,sudov:ee.a,tail:te.a,theme:ae.a,top:ne.a,unalias:re.a,wget:ie.a}[i.toLowerCase()];o?o(this,e,t,r,n.slice(1)):this.error(`Command ${n[0]} not found`)}getProgressText(){if(null===this.action)throw new Error("trying to get the progress text when there's no action");return Object(k.a)({progress:(this.action.time-this.action.timeLeft)/this.action.time,totalTicks:50})}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(89);function r(e,t,a,r,i){0!==i.length?1===i.length&&Object(n.e)(i[0]+"")?e.print("Set alias "+i[0]):2===i.length&&"-g"===i[0]&&Object(n.e)(i[1]+"",!0)?e.print("Set global alias "+i[1]):e.error('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]'):Object(n.f)()}},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?e.startAnalyze():e.print("Incorrect usage of analyze command. Usage: analyze")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(90),r=a(85);function i(e,t,a,i,o){if(0!==o.length)return void e.print("Incorrect usage of backdoor command. Usage: backdoor");i instanceof n.a||e.error("Can only backdoor normal servers");const s=i;s.purchasedByPlayer?e.error("Cannot use backdoor on your own machines! You are currently connected to your home PC or one of your purchased servers"):s.hasAdminRights?s.requiredHackingSkill>a.hacking_skill?e.error("Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof r.a?e.error("Cannot use backdoor on this type of Server"):e.startBackdoor(a):e.error("You do not have admin rights for this machine! Cannot backdoor")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(370),r=a(51);function i(e,t,a,i,o){if(!r.a.hasOwnProperty("Darkweb Server"))return void e.error("You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)");if(1!=o.length)return e.print("Incorrect number of arguments. Usage: "),e.print("buy -l"),void e.print("buy [item name]");const s=o[0]+"";"-l"==s||"-1"==s||"--list"==s?Object(n.c)():Object(n.a)(s)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(129),r=a(95),i=a(413);function o(e,t,a,o,s){if(1!==s.length)return void e.error("Incorrect usage of cat command. Usage: cat [file]");const l=e.getFilepath(s[0]+"");if(l.endsWith(".msg")||l.endsWith(".lit")||l.endsWith(".txt")){if(l.endsWith(".msg")||l.endsWith(".lit"))for(let e=0;e1)e.error("Incorrect number of arguments. Usage: cd [dir]");else{let t=1===i.length?i[0]+"":"/",r="";if("/"===t)r="/";else{if(t=Object(n.i)(t),r=Object(n.a)(t,e.cwd()),null===r||""===r)return void e.error("Invalid path. Failed to change directories");const i=a.getCurrentServer();if(!i.scripts.some(e=>e.filename.startsWith(r+""))&&!i.textFiles.some(e=>e.fn.startsWith(r+"")))return void e.error("Invalid path. Failed to change directories")}e.setcwd(r)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(166),r=a(83);function i(e,t,a,i,o){if(o.length<1)e.error("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const t=e.getFilepath(o[0]+"");if(!Object(r.a)(t))return void e.error("tail can only be called on .script files (filename must end with .script)");const a=Object(n.a)(t,o.slice(1),i);if(null==a)return void e.error("No such script exists");a.displayLog()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(35);function r(e,t,a,r,i){if(1!==i.length)return void e.error("Incorrect usage of connect command. Usage: connect [ip/hostname]");const o=i[0]+"";for(let t=0;ti.a.saveAs(e,a))}if(Object(n.a)(t)){const n=e.getScript(a,t);if(null!=n)return n.download()}else{if(!t.endsWith(".txt"))return void e.error("Cannot download this filetype");{const n=e.getTextFile(a,t);if(null!=n)return n.download()}}return void e.error(t+" does not exist")}catch(t){return void e.error(t+"")}}},,,function(module,__webpack_exports__,__webpack_require__){"use strict";function expr(terminal,engine,player,server,args){if(0===args.length)return void terminal.error("Incorrect usage of expr command. Usage: expr [math expression]");const expr=args.join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,"");let result;try{result=eval(sanitizedExpr)}catch(e){return void terminal.error("Could not evaluate expression: "+sanitizedExpr)}terminal.print(result)}__webpack_require__.d(__webpack_exports__,"a",(function(){return expr}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(90);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of hack command. Usage: hack");r instanceof n.a||e.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers");const o=r;o.purchasedByPlayer?e.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):o.hasAdminRights?o.requiredHackingSkill>a.hacking_skill?e.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):e.startHack(a):e.error("You do not have admin rights for this machine! Cannot hack")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(371);function r(e,t,a,r,i){if(0===i.length||1===i.length)if(0===i.length)n.b.forEach(t=>e.print(t));else{const t=i[0],a=n.a[t];if(null==a)return void e.error("No help topics match '"+t+"'");a.forEach(t=>e.print(t))}else e.error("Incorrect usage of help command. Usage: help")}},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?(a.getCurrentServer().isConnectedTo=!1,a.currentServer=a.getHomeComputer().ip,a.getCurrentServer().isConnectedTo=!0,e.print("Connected to home"),e.setcwd("/")):e.error("Incorrect usage of home command. Usage: home")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?e.print(a.getCurrentServer().hostname):e.error("Incorrect usage of hostname command. Usage: hostname")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?e.print(a.getCurrentServer().ip):e.error("Incorrect usage of ifconfig command. Usage: ifconfig")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(99);function r(e,t,a,r,i){try{if(i.length<1)return void e.error("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("number"==typeof i[0]){const t=i[0];return void(Object(n.a)(t)?e.print("Killing script with PID "+t):e.print(`Failed to kill script with PID ${t}. No such script exists`))}const t=e.getFilepath(i[0]),a=r.getRunningScript(t,i.slice(1));if(null==a)return void e.error("No such script is running. Nothing to kill");Object(n.a)(a,r.ip,!1),e.print("Killing "+t)}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(99),r=a(207);function i(e,t,a,i){for(let e=i.runningScripts.length-1;e>=0;--e)Object(n.a)(i.runningScripts[e],i.ip,!1);r.a.emitEvent(),e.print("Killing all running scripts")}},function(e,t,a){"use strict";function n(e,t,a){e.print(a.getCurrentServer().cpuCores+" Core(s)")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(2);function r(e,t,a,r,i){try{if(1!==i.length&&3!==i.length)return void e.error("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");const t=i[0]+"";let r=1;if(3===i.length&&"-t"===i[1]&&(r=Math.round(parseInt(i[2]+"")),isNaN(r)||r<1))return void e.error("Invalid number of threads specified. Number of threads must be greater than 1");const o=e.getScript(a,t);if(null==o)return void e.error("No such script exists!");const s=o.ramUsage*r;e.print(`This script requires ${n.a.formatRAM(s)} of RAM to run for ${r} thread(s)`)}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(83),r=a(195);function i(e,t,a,i,o){if(2===o.length)try{const t=o[0]+"",s=o[1]+"";if(!Object(n.a)(t)&&!t.endsWith(".txt"))return void e.error("'mv' can only be used on scripts and text files (.txt)");const l=e.getFile(a,t);if(null==l)return void e.error(`Source file ${t} does not exist`);const c=e.getFilepath(t),u=e.getFilepath(s),m=e.getFile(a,s);if(Object(n.a)(t)){const t=l;if(!Object(n.a)(s))return void e.error("Source and destination files must have the same type");if(i.isRunning(c))return void e.error("Cannot use 'mv' on a script that is running");if(null!=m){if(!i.removeFile(u).res)return void e.error("Something went wrong...please contact game dev (probably a bug)");e.print("Warning: The destination file was overwritten")}t.filename=u}else if(l instanceof r.a){const t=l;if(!s.endsWith(".txt"))return void e.error("Source and destination files must have the same type");if(null!=m){if(!i.removeFile(u).res)return void e.error("Something went wrong...please contact game dev (probably a bug)");e.print("Warning: The destination file was overwritten")}t.fn=u}}catch(t){e.error(t+"")}else e.error("Incorrect number of arguments. Usage: mv [src] [dest]")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(83),r=a(295);function i(e,t,a,i,o){if(1===o.length)try{const i=o[0]+"";if(".fconf"===i){const e=Object(r.a)();return void t.loadScriptEditorContent(i,e)}if(Object(n.a)(i)){const n=e.getFilepath(i),r=e.getScript(a,i);if(null==r){let e="";(i.endsWith(".ns")||i.endsWith(".js"))&&(e="export async function main(ns) {\n\n}"),t.loadScriptEditorContent(n,e)}else t.loadScriptEditorContent(n,r.code)}else{if(!i.endsWith(".txt"))return void e.error("Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");{const n=e.getFilepath(i),r=e.getTextFile(a,i);null==r?t.loadScriptEditorContent(n):t.loadScriptEditorContent(n,r.text)}}}catch(t){e.error(t+"")}else e.error("Incorrect usage of nano command. Usage: nano [scriptname]")}},function(e,t,a){"use strict";function n(e,t,a,n,r){if(0===r.length)for(let t=0;t0?p:1,g=h._;if(null==Object(o.a)(u,g,l)){for(let t=0;ts)return void e.print("This machine does not have enough RAM to run this script with "+f+" threads. Script requires "+o+"GB of RAM");const c=new i.a(a,g);c.threads=f;return Object(r.e)(c,l)?(e.print(`Running script with ${f} thread(s), pid ${c.pid} and args: ${JSON.stringify(g)}.`),void(d&&Object(n.a)(c))):void e.error("Failed to start script")}e.print("ERROR: No such script")}else e.print("ERROR: This script is already running. Cannot run multiple instances")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(55);function r(e,t,a,r,i){if(i.length<1)return;const o=i[0]+"";if(a.hasProgram(o)){if(!(i.length<1)){for(const t of Object.values(n.a))if(t.name===o)return void t.run(e,a,r,i.slice(1).map(e=>e+""));e.print("Invalid executable. Cannot be run")}}else e.error("No such executable on home computer (Only programs that exist on your home computer can be run)")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(55);function r(e,t,a,r,i){if(0===i.length)e.executeScanAnalyzeCommand(a,1);else{if(i.length>2)return void e.error("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let t=!1;2===i.length&&"-a"===i[1]&&(t=!0);const r=parseInt(i[0]+"");if(isNaN(r)||r<0)return void e.error("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(r>3&&!a.hasProgram(n.a.DeepscanV1.name)&&!a.hasProgram(n.a.DeepscanV2.name))return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(r>5&&!a.hasProgram(n.a.DeepscanV2.name))return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(r>10)return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 10");e.executeScanAnalyzeCommand(a,r,t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(95),r=a(35),i=a(83);function o(e,t,a,o,s){try{if(2!==s.length)return void e.error("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const t=e.getFilepath(s[0]+"");if(!t.endsWith(".lit")&&!Object(i.a)(t)&&!t.endsWith(".txt"))return void e.error("scp only works for scripts, text files (.txt), and literature files (.lit)");const a=Object(r.b)(s[1]+"");if(null==a)return void e.error(`Invalid destination. ${s[1]} not found`);if(t.endsWith(".lit")){let r=!1;for(let e=0;e1){e.error("Found several potential candidates:");for(const t of r)e.error(`${t.filename} ${t.args.join(" ")}`);return void e.error("Script arguments need to be specified.")}e.error("No such script exists.")}else{const t=Object(r.b)(l[0],s);if(null==t)return void e.error("No such script exists");Object(n.a)(t)}}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(63);function r(e,t,a,r,i){if(1!==i.length&&3!==i.length)e.error("Incorrect number of arguments."),e.error("Usage: theme [default|muted|solarized] | #[background color hex] #[text color hex] #[highlight color hex]");else if(1===i.length){const t=i[0];if("default"==t)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#000000"),document.body.style.setProperty("--my-prompt-color","#f92672");else if("muted"==t)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#252527");else{if("solarized"!=t)return e.error("Theme not found");document.body.style.setProperty("--my-highlight-color","#6c71c4"),document.body.style.setProperty("--my-font-color","#839496"),document.body.style.setProperty("--my-background-color","#002b36")}n.a.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),n.a.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),n.a.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color"),n.a.THEME_PROMPT_COLOR=document.body.style.getPropertyValue("--my-prompt-color")}else{const t=i[0]+"",a=i[1]+"",r=i[2]+"";if(!(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r)))return e.error("Invalid Hex Input for theme");document.body.style.setProperty("--my-highlight-color",r),document.body.style.setProperty("--my-font-color",a),document.body.style.setProperty("--my-background-color",t),n.a.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),n.a.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),n.a.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(420),r=a(2);function i(e,t,a,i,o){if(0!==o.length)return void e.error("Incorrect usage of top command. Usage: top");const s=`Script${" ".repeat(40-"Script".length)}PID${" ".repeat(10-"PID".length)}Threads${" ".repeat(16-"Threads".length)}RAM Usage`;e.print(s);const l=i.runningScripts;for(let t=0;t=this.getMaximumNumberProducts()}calculateProductionFactors(){let e=0;for(let t=0;t<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++t){const a=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[t],n=this.warehouses[a];if(!(n instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a))continue;const r=n.materials,i=Math.pow(.002*r.RealEstate.qty+1,this.reFac)*Math.pow(.002*r.Hardware.qty+1,this.hwFac)*Math.pow(.002*r.Robots.qty+1,this.robFac)*Math.pow(.002*r.AICores.qty+1,this.aiFac);e+=Math.pow(i,.73)}this.prodMult=e<1?1:e}updateWarehouseSizeUsed(e){e.updateMaterialSizeUsed();for(const t in this.products)if(this.products.hasOwnProperty(t)){const a=this.products[t];if(void 0===a)continue;e.sizeUsed+=a.data[e.loc][0]*a.siz,a.data[e.loc][0]>0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__.c)(a.data[e.loc][0]*a.siz,0)+"
")}}process(e=1,t,a){if(this.state=t,"START"===t){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);let t=0;for(const n in this.offices){const r=this.offices[n];0!==r&&(r instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(t+=r.process(e,a,this)))}this.thisCycleExpenses=this.thisCycleExpenses.plus(t),this.processMaterialMarket(),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);const n=a.getDreamSenseGain(),r=4*n;return void(n>0&&(this.popularity+=n*e,this.awareness+=r*e))}let n=this.processMaterials(e,a);Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1])),n=this.processProducts(e,a),Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1]))}processMaterialMarket(){const e=this.reqMats,t=this.prodMats;for(let a=0;a<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++a)if(this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a){const n=this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]];if(0===n)continue;for(const t in e)e.hasOwnProperty(t)&&n.materials[t].processMarket();for(let e=0;e0&&(t.qty+=a,expenses+=a*t.bCost),this.updateWarehouseSizeUsed(warehouse))}const e={};for(const t in warehouse.materials){if(!warehouse.materials.hasOwnProperty(t))continue;if(!warehouse.smartSupplyEnabled||!Object.keys(this.reqMats).includes(t))continue;const a=warehouse.materials[t],n=this.reqMats[t];if(void 0===n)throw new Error(`reqMat "${t}" is undefined`);a.buy=n*warehouse.smartSupplyStore;let r=a.buy*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;const i=Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[t]);r=Math.min(r,i),r>0&&(e[t]=r)}let t=1e99;for(const a in e){const n=e[a];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");const r=this.reqMats[a];if(void 0===r)throw new Error(`reqMat "${a}" is undefined`);const i=n/r;in)for(const t in e){const r=e[t];if(void 0===r)throw new Error("Somehow smartbuy matname is undefined");e[t]=Math.floor(r*n/a)}for(const t in e){if(!warehouse.smartSupplyUseLeftovers[t])continue;const a=warehouse.materials[t],n=e[t];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");e[t]=Math.max(0,n-a.qty)}for(const t in e){const a=warehouse.materials[t],n=e[t];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");a.qty+=n,expenses+=n*a.bCost}break}case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){const e=warehouse.materials[this.prodMats[0]],t=this.getOfficeProductivity(office)*this.prodMult*corporation.getProductionMultiplier()*this.getProductionMultiplier();let a;a=e.prdman[0]?Math.min(t,e.prdman[1]):t,a*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;let n=0;for(let e=0;e0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/n);a=Math.min(e,a)}a<0&&(a=0),warehouse.smartSupplyStore+=a/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);let r=1;for(const e in this.reqMats)if(this.reqMats.hasOwnProperty(e)){const t=this.reqMats[e];if(void 0===t)continue;const n=t*a;warehouse.materials[e].qty0&&a>0){for(const e in this.reqMats){const t=this.reqMats[e];if(void 0===t)continue;const n=t*a*r;warehouse.materials[e].qty-=n,warehouse.materials[e].prd=0,warehouse.materials[e].prd-=n/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)}for(let e=0;emat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(const matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];mat.totalExp=0;for(let expI=0;expI=a.size)return[0,0];{const e=Math.floor((a.size-a.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[matName]);amt=Math.min(e,amt)}a.materials[matName].imp+=amt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles),a.materials[matName].qty+=amt,a.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,t.updateWarehouseSizeUsed(a);break}}}mat.totalExp/=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error("Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.RandD],.5)*corporation.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}}return[revenue,expenses]}processProducts(e=1,t){let a=0;if("PRODUCTION"===this.state)for(const t in this.products){const a=this.products[t];if(void 0!==a&&!a.fin){const t=a.createCity,n=this.offices[t];if(0===n)continue;const r=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Engineer],i=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Management],o=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;a.createProduct(e,c),a.prog>=100&&a.finishProduct(n.employeeProd,this);break}}for(const n in this.products)if(this.products.hasOwnProperty(n)){const r=this.products[n];r instanceof _Product__WEBPACK_IMPORTED_MODULE_10__.a&&r.fin&&(a+=this.processProduct(e,r,t))}return[a,0]}processProduct(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a)switch(this.state){case"PRODUCTION":{const e=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let t;t=product.prdman[city][0]?Math.min(e,product.prdman[city][1]):e,t*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;let a=product.siz;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const t=product.reqMats[e];a-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[e]*t}if(a>0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/a);t=Math.min(e,t)}warehouse.smartSupplyStore+=t/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);let n=1;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const a=product.reqMats[e]*t;warehouse.materials[e].qty0&&t>0){for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const a=product.reqMats[e]*t*n;warehouse.materials[e].qty-=a,warehouse.materials[e].prd-=a/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=t*n}product.data[city][1]=t*n/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);break}case"SALE":{product.pCost=0;for(const e in product.reqMats)product.reqMats.hasOwnProperty(e)&&(product.pCost+=product.reqMats[e]*warehouse.materials[e].bCost);product.pCost*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;let sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,a=e,n=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(a/n);let i;0===n||0===r?0===a?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else if(product.marketTa1)sCost=product.pCost+markupLimit;else if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sCost)){const sCostString=product.sCost;0===product.mku&&(console.error("mku is zero, reverting to 1 to avoid Infinity"),product.mku=1),sCost=sCostString.replace(/MP/g,product.pCost+product.rat/product.mku+""),sCost=eval(sCost)}else sCost=product.sCost;let markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));const maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier();let sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error("Invalid State: "+this.state)}}return totalProfit}discontinueProduct(e){for(const t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]}upgrade(e,t){const a=t.corporation,n=t.office,r=e[0];for(;this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let e=0;e=1)&&console.warn(`Exponential factor is ${t}. This is not an intended value for it`),a<1&&console.warn(`Linear factor is ${a}. This is not an intended value for it`),Math.pow(e,t)+e/a}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(41);const r={[n.a.Food]:{Quality:.7,Durability:.1,Aesthetics:.2},[n.a.Tobacco]:{Quality:.4,Durability:.2,Reliability:.2,Aesthetics:.2},[n.a.Pharmaceutical]:{Quality:.2,Performance:.2,Durability:.1,Reliability:.3,Features:.2},[n.a.Computer]:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},Computer:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},[n.a.Robotics]:{Quality:.1,Performance:.2,Durability:.2,Reliability:.2,Aesthetics:.1,Features:.2},[n.a.Software]:{Quality:.2,Performance:.2,Reliability:.2,Durability:.2,Features:.2},[n.a.Healthcare]:{Quality:.4,Performance:.1,Durability:.1,Reliability:.3,Features:.1},[n.a.RealEstate]:{Quality:.2,Durability:.25,Reliability:.1,Aesthetics:.35,Features:.1}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=[{desc:"This gang member is currently idle",isCombat:!0,isHacking:!0,name:"Unassigned",params:{hackWeight:100}},{desc:"Assign this gang member to create and distribute ransomware

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Ransomware",params:{baseRespect:5e-5,baseWanted:1e-4,baseMoney:1,hackWeight:100,difficulty:1}},{desc:"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Phishing",params:{baseRespect:8e-5,baseWanted:.003,baseMoney:2.5,hackWeight:85,chaWeight:15,difficulty:3.5}},{desc:"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Identity Theft",params:{baseRespect:1e-4,baseWanted:.075,baseMoney:6,hackWeight:80,chaWeight:20,difficulty:5}},{desc:"Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"DDoS Attacks",params:{baseRespect:4e-4,baseWanted:.2,hackWeight:100,difficulty:8}},{desc:"Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Plant Virus",params:{baseRespect:6e-4,baseWanted:.4,hackWeight:100,difficulty:12}},{desc:"Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Fraud & Counterfeiting",params:{baseRespect:4e-4,baseWanted:.3,baseMoney:15,hackWeight:80,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Money Laundering",params:{baseRespect:.001,baseWanted:1.25,baseMoney:120,hackWeight:75,chaWeight:25,difficulty:25}},{desc:"Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level",isCombat:!1,isHacking:!0,name:"Cyberterrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:80,chaWeight:20,difficulty:36}},{desc:"Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level",isCombat:!1,isHacking:!0,name:"Ethical Hacking",params:{baseWanted:-.001,baseMoney:1,hackWeight:90,chaWeight:10,difficulty:1}},{desc:"Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Mug People",params:{baseRespect:5e-5,baseWanted:5e-5,baseMoney:1.2,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}},{desc:"Assign this gang member to sell drugs

Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory",isCombat:!0,isHacking:!1,name:"Deal Drugs",params:{baseRespect:6e-5,baseWanted:.002,baseMoney:5,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3.5,territory:{money:1.2,respect:1,wanted:1.15}}},{desc:"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Strongarm Civilians",params:{baseRespect:4e-5,baseWanted:.02,baseMoney:2.5,hackWeight:10,strWeight:25,defWeight:25,dexWeight:20,agiWeight:10,chaWeight:10,difficulty:5,territory:{money:1.6,respect:1.1,wanted:1.5}}},{desc:"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:15,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:14}},{desc:"Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Armed Robbery",params:{baseRespect:14e-5,baseWanted:.1,baseMoney:38,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Traffick Illegal Arms",params:{baseRespect:2e-4,baseWanted:.24,baseMoney:58,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:25,difficulty:32,territory:{money:1.4,respect:1.3,wanted:1.25}}},{desc:"Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Threaten & Blackmail",params:{baseRespect:2e-4,baseWanted:.125,baseMoney:24,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}},{desc:"Assign this gang member to engage in human trafficking operations

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Human Trafficking",params:{baseRespect:.004,baseWanted:1.25,baseMoney:120,hackWeight:30,strWeight:5,defWeight:5,dexWeight:30,chaWeight:30,difficulty:36,territory:{money:1.5,respect:1.5,wanted:1.6}}},{desc:"Assign this gang member to commit acts of terrorism

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

Decreases wanted level",isCombat:!0,isHacking:!0,name:"Vigilante Justice",params:{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1,territory:{money:1,respect:1,wanted:.9}}},{desc:"Assign this gang member to increase their combat stats (str, def, dex, agi)",isCombat:!0,isHacking:!0,name:"Train Combat",params:{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:100}},{desc:"Assign this gang member to train their hacking skills",isCombat:!0,isHacking:!0,name:"Train Hacking",params:{hackWeight:100,difficulty:45}},{desc:"Assign this gang member to train their charisma",isCombat:!0,isHacking:!0,name:"Train Charisma",params:{chaWeight:100,difficulty:8}},{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.",isCombat:!0,isHacking:!0,name:"Territory Warfare",params:{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:5}}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(423),r=a(174),i=a(149),o=a(59),s=a(14);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class c{constructor(e=""){l(this,"task","Unassigned"),l(this,"earnedRespect",0),l(this,"hack",1),l(this,"str",1),l(this,"def",1),l(this,"dex",1),l(this,"agi",1),l(this,"cha",1),l(this,"hack_exp",0),l(this,"str_exp",0),l(this,"def_exp",0),l(this,"dex_exp",0),l(this,"agi_exp",0),l(this,"cha_exp",0),l(this,"hack_mult",1),l(this,"str_mult",1),l(this,"def_mult",1),l(this,"dex_mult",1),l(this,"agi_mult",1),l(this,"cha_mult",1),l(this,"hack_asc_points",0),l(this,"str_asc_points",0),l(this,"def_asc_points",0),l(this,"dex_asc_points",0),l(this,"agi_asc_points",0),l(this,"cha_asc_points",0),l(this,"upgrades",[]),l(this,"augmentations",[]),this.name=e}calculateSkill(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)}calculateAscensionMult(e){return Math.max(Math.pow(e/4e3,.7),1)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(e){return r.a.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof n.a&&(this.task=this.task.name),r.a.hasOwnProperty(this.task)?r.a[this.task]:r.a.Unassigned}calculateRespectGain(e){const t=this.getTask();if(0===t.baseRespect)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=4*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.respect)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 11*t.baseRespect*a*n*r}calculateWantedLevelGain(e){const t=this.getTask();if(0===t.baseWanted)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.5*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.wanted)/100);if(isNaN(n)||n<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*a*n;const r=7*t.baseWanted/Math.pow(3*a*n,.8);return Math.min(100,r)}calculateMoneyGain(e){const t=this.getTask();if(0===t.baseMoney)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.2*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.money)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 5*t.baseMoney*a*n*r}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(e=1){const t=this.getTask();if(t===r.a.Unassigned)return;const a=Math.pow(t.difficulty,.9)*e,n=this.expMult();this.hack_exp+=t.hackWeight/1500*a*n.hack,this.str_exp+=t.strWeight/1500*a*n.str,this.def_exp+=t.defWeight/1500*a*n.def,this.dex_exp+=t.dexWeight/1500*a*n.dex,this.agi_exp+=t.agiWeight/1500*a*n.agi,this.cha_exp+=t.chaWeight/1500*a*n.cha}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Math.max(this.hack_exp-1e3,0),str:Math.max(this.str_exp-1e3,0),def:Math.max(this.def_exp-1e3,0),dex:Math.max(this.dex_exp-1e3,0),agi:Math.max(this.agi_exp-1e3,0),cha:Math.max(this.cha_exp-1e3,0)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}getAscensionResults(){const e=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+e.hack)/this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points+e.str)/this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points+e.def)/this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points+e.dex)/this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points+e.agi)/this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points+e.cha)/this.calculateAscensionMult(this.cha_asc_points)}}ascend(){const e=this.getAscensionResults(),t=this.getGainedAscensionPoints();this.hack_asc_points+=t.hack,this.str_asc_points+=t.str,this.def_asc_points+=t.def,this.dex_asc_points+=t.dex,this.agi_asc_points+=t.agi,this.cha_asc_points+=t.cha,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e")}getType(){switch(this.type){case n.a.Weapon:return"Weapon";case n.a.Armor:return"Armor";case n.a.Vehicle:return"Vehicle";case n.a.Rootkit:return"Rootkit";case n.a.Augmentation:return"Augmentation";default:return""}}}},function(e,t,a){"use strict";function n(e){return!isNaN(e)&&(0!==e&&0==(e&e-1))}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(66),r=a(7);const i=[{b:!0,initPrice:{max:28e3,min:17e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.AevumECorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumECorp]},{b:!0,initPrice:{max:34e3,min:24e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.Sector12MegaCorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12MegaCorp]},{b:!0,initPrice:{max:25e3,min:12e3},marketCap:16e11,mv:{divisor:100,max:80,min:70},name:r.a.Sector12BladeIndustries,otlkMag:13,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12BladeIndustries]},{b:!0,initPrice:{max:25e3,min:1e4},marketCap:15e11,mv:{divisor:100,max:75,min:65},name:r.a.AevumClarkeIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumClarkeIncorporated]},{b:!0,initPrice:{max:43e3,min:32e3},marketCap:18e11,mv:{divisor:100,max:70,min:60},name:r.a.VolhavenOmniTekIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.VolhavenOmniTekIncorporated]},{b:!0,initPrice:{max:8e4,min:5e4},marketCap:2e12,mv:{divisor:100,max:110,min:100},name:r.a.Sector12FourSigma,otlkMag:17,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12FourSigma]},{b:!0,initPrice:{max:28e3,min:16e3},marketCap:19e11,mv:{divisor:100,max:85,min:75},name:r.a.ChongqingKuaiGongInternational,otlkMag:10,spreadPerc:{divisor:10,max:7,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.ChongqingKuaiGongInternational]},{b:!0,initPrice:{max:36e3,min:29e3},marketCap:2e12,mv:{divisor:100,max:130,min:120},name:r.a.AevumFulcrumTechnologies,otlkMag:16,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumFulcrumTechnologies]},{b:!0,initPrice:{max:25e3,min:2e4},marketCap:12e11,mv:{divisor:100,max:90,min:80},name:r.a.IshimaStormTechnologies,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.IshimaStormTechnologies]},{b:!0,initPrice:{max:19e3,min:6e3},marketCap:9e11,mv:{divisor:100,max:70,min:60},name:r.a.NewTokyoDefComm,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.NewTokyoDefComm]},{b:!0,initPrice:{max:18e3,min:1e4},marketCap:825e9,mv:{divisor:100,max:65,min:55},name:r.a.VolhavenHeliosLabs,otlkMag:9,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.VolhavenHeliosLabs]},{b:!0,initPrice:{max:14e3,min:8e3},marketCap:1e12,mv:{divisor:100,max:80,min:70},name:r.a.NewTokyoVitaLife,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.NewTokyoVitaLife]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:8e11,mv:{divisor:100,max:70,min:60},name:r.a.Sector12IcarusMicrosystems,otlkMag:7.5,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.Sector12IcarusMicrosystems]},{b:!0,initPrice:{max:29e3,min:16e3},marketCap:9e11,mv:{divisor:100,max:60,min:50},name:r.a.Sector12UniversalEnergy,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.Sector12UniversalEnergy]},{b:!0,initPrice:{max:17e3,min:8e3},marketCap:64e10,mv:{divisor:100,max:65,min:55},name:r.a.AevumAeroCorp,otlkMag:6,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.AevumAeroCorp]},{b:!0,initPrice:{max:15e3,min:6e3},marketCap:6e11,mv:{divisor:100,max:75,min:65},name:r.a.VolhavenOmniaCybersystems,otlkMag:4.5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.VolhavenOmniaCybersystems]},{b:!0,initPrice:{max:28e3,min:14e3},marketCap:705e9,mv:{divisor:100,max:80,min:70},name:r.a.ChongqingSolarisSpaceSystems,otlkMag:8.5,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.ChongqingSolarisSpaceSystems]},{b:!0,initPrice:{max:3e4,min:12e3},marketCap:695e9,mv:{divisor:100,max:65,min:55},name:r.a.NewTokyoGlobalPharmaceuticals,otlkMag:10.5,spreadPerc:{divisor:10,max:10,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.NewTokyoGlobalPharmaceuticals]},{b:!0,initPrice:{max:27e3,min:15e3},marketCap:6e11,mv:{divisor:100,max:80,min:70},name:r.a.IshimaNovaMedical,otlkMag:5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.IshimaNovaMedical]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:45e10,mv:{divisor:100,max:260,min:240},name:r.a.AevumWatchdogSecurity,otlkMag:1.5,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:54e3,min:12e3},symbol:n.a[r.a.AevumWatchdogSecurity]},{b:!0,initPrice:{max:8e3,min:4500},marketCap:3e11,mv:{divisor:100,max:135,min:115},name:r.a.VolhavenLexoCorp,otlkMag:6,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.VolhavenLexoCorp]},{b:!0,initPrice:{max:7e3,min:2e3},marketCap:18e10,mv:{divisor:100,max:70,min:50},name:r.a.AevumRhoConstruction,otlkMag:1,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:6e4},symbol:n.a[r.a.AevumRhoConstruction]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:24e10,mv:{divisor:100,max:205,min:175},name:r.a.Sector12AlphaEnterprises,otlkMag:10,spreadPerc:{divisor:10,max:16,min:5},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12AlphaEnterprises]},{b:!0,initPrice:{max:8e3,min:3e3},marketCap:2e11,mv:{divisor:100,max:170,min:150},name:r.a.VolhavenSysCoreSecurities,otlkMag:3,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:9e4,min:15e3},symbol:n.a[r.a.VolhavenSysCoreSecurities]},{b:!0,initPrice:{max:6e3,min:1e3},marketCap:185e9,mv:{divisor:100,max:100,min:80},name:r.a.VolhavenCompuTek,otlkMag:4,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:6e4},symbol:n.a[r.a.VolhavenCompuTek]},{b:!0,initPrice:{max:5e3,min:1e3},marketCap:58e9,mv:{divisor:100,max:400,min:200},name:r.a.AevumNetLinkTechnologies,otlkMag:1,spreadPerc:{divisor:10,max:20,min:5},shareTxForMovement:{max:54e3,min:18e3},symbol:n.a[r.a.AevumNetLinkTechnologies]},{b:!0,initPrice:{max:8e3,min:1e3},marketCap:6e10,mv:{divisor:100,max:110,min:90},name:r.a.IshimaOmegaSoftware,otlkMag:.5,spreadPerc:{divisor:10,max:13,min:4},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.IshimaOmegaSoftware]},{b:!1,initPrice:{max:4500,min:500},marketCap:45e9,mv:{divisor:100,max:80,min:70},name:r.a.Sector12FoodNStuff,otlkMag:1,spreadPerc:{divisor:10,max:10,min:6},shareTxForMovement:{max:18e4,min:6e4},symbol:n.a[r.a.Sector12FoodNStuff]},{b:!0,initPrice:{max:3500,min:1500},marketCap:3e10,mv:{divisor:100,max:275,min:100},name:"Sigma Cosmetics",otlkMag:0,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:7e4,min:2e4},symbol:n.a["Sigma Cosmetics"]},{b:!0,initPrice:{max:1500,min:250},marketCap:42e9,mv:{divisor:100,max:350,min:200},name:"Joes Guns",otlkMag:1,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:52e3,min:15e3},symbol:n.a["Joes Guns"]},{b:!0,initPrice:{max:1500,min:250},marketCap:1e11,mv:{divisor:100,max:175,min:120},name:"Catalyst Ventures",otlkMag:13.5,spreadPerc:{divisor:10,max:14,min:5},shareTxForMovement:{max:72e3,min:24e3},symbol:n.a["Catalyst Ventures"]},{b:!0,initPrice:{max:3e4,min:15e3},marketCap:36e10,mv:{divisor:100,max:80,min:70},name:"Microdyne Technologies",otlkMag:8,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:216e3,min:9e4},symbol:n.a["Microdyne Technologies"]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:42e10,mv:{divisor:100,max:70,min:50},name:"Titan Laboratories",otlkMag:11,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:216e3,min:9e4},symbol:n.a["Titan Laboratories"]}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(696),i=a(697);class o extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.rerender=this.rerender.bind(this)}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){return n.createElement("div",{className:"stock-market-container"},n.createElement(r.a,{initStockMarket:this.props.initStockMarket,p:this.props.p,rerender:this.rerender}),this.props.p.hasWseAccount&&n.createElement(i.a,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,eventEmitterForReset:this.props.eventEmitterForReset,p:this.props.p,placeOrder:this.props.placeOrder,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stockMarket:this.props.stockMarket}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(212),i=a(5),o=a(22),s=a(219),l=a(11),c=a(9);const u={display:"block"};class m extends n.Component{constructor(e){super(e),this.handleClick4SMarketDataHelpTip=this.handleClick4SMarketDataHelpTip.bind(this),this.purchaseWseAccount=this.purchaseWseAccount.bind(this),this.purchaseTixApiAccess=this.purchaseTixApiAccess.bind(this),this.purchase4SMarketData=this.purchase4SMarketData.bind(this),this.purchase4SMarketDataTixApiAccess=this.purchase4SMarketDataTixApiAccess.bind(this)}handleClick4SMarketDataHelpTip(){Object(c.a)("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility

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

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

A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change.")}purchaseWseAccount(){if(this.props.p.hasWseAccount)return;if(!this.props.p.canAfford(i.a.WSEAccountCost))return;this.props.p.hasWseAccount=!0,this.props.initStockMarket(),this.props.p.loseMoney(i.a.WSEAccountCost),this.props.rerender();const e=document.getElementById("world-menu-header");e instanceof HTMLElement&&(e.click(),e.click())}purchaseTixApiAccess(){this.props.p.hasTixApiAccess||this.props.p.canAfford(i.a.TIXAPICost)&&(this.props.p.hasTixApiAccess=!0,this.props.p.loseMoney(i.a.TIXAPICost),this.props.rerender())}purchase4SMarketData(){this.props.p.has4SData||this.props.p.canAfford(Object(r.a)())&&(this.props.p.has4SData=!0,this.props.p.loseMoney(Object(r.a)()),this.props.rerender())}purchase4SMarketDataTixApiAccess(){this.props.p.has4SDataTixApi||this.props.p.canAfford(Object(r.b)())&&(this.props.p.has4SDataTixApi=!0,this.props.p.loseMoney(Object(r.b)()),this.props.rerender())}renderPurchaseWseAccountButton(){if(this.props.p.hasWseAccount)return n.createElement(s.a,{text:"WSE Account - Purchased"});{const e=i.a.WSEAccountCost;return n.createElement(o.a,{disabled:!this.props.p.canAfford(e),onClick:this.purchaseWseAccount,text:n.createElement(n.Fragment,null,"Buy WSE Account - ",n.createElement(l.a,{money:e,player:this.props.p}))})}}renderPurchaseTixApiAccessButton(){if(this.props.p.hasTixApiAccess)return n.createElement(s.a,{text:"TIX API Access - Purchased"});{const e=i.a.TIXAPICost;return n.createElement(o.a,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchaseTixApiAccess,style:u,text:n.createElement(n.Fragment,null,"Buy Trade Information eXchange (TIX) API Access - ",n.createElement(l.a,{money:e,player:this.props.p}))})}}renderPurchase4SMarketDataButton(){if(this.props.p.has4SData)return n.createElement(s.a,{text:"4S Market Data - Purchased",tooltip:"Lets you view additional pricing and volatility information about stocks"});{const e=Object(r.a)();return n.createElement(o.a,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchase4SMarketData,text:n.createElement(n.Fragment,null,"Buy 4S Market Data Access - ",n.createElement(l.a,{money:e,player:this.props.p})),tooltip:"Lets you view additional pricing and volatility information about stocks"})}}renderPurchase4SMarketDataTixApiAccessButton(){if(this.props.p.hasTixApiAccess){if(this.props.p.has4SDataTixApi)return n.createElement(s.a,{text:"4S Market Data TIX API - Purchased",tooltip:"Let you access 4S Market Data through Netscript"});{const e=Object(r.b)();return n.createElement(o.a,{disabled:!this.props.p.canAfford(e),onClick:this.purchase4SMarketDataTixApiAccess,text:n.createElement(n.Fragment,null,"Buy 4S Market Data TIX API Access - ",n.createElement(l.a,{money:e,player:this.props.p})),tooltip:"Let you access 4S Market Data through Netscript"})}}return n.createElement(o.a,{disabled:!0,text:"Buy 4S Market Data TIX API Access",tooltip:"Requires TIX API Access"})}render(){return n.createElement("div",{className:"stock-market-info-and-purchases"},n.createElement("p",null,"Welcome to the World Stock Exchange (WSE)!"),n.createElement("button",{className:"std-button"},n.createElement("a",{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},"Investopedia")),n.createElement("br",null),n.createElement("p",null,"To begin trading, you must first purchase an account:"),this.renderPurchaseWseAccountButton(),n.createElement("h2",null,"Trade Information eXchange (TIX) API"),n.createElement("p",null,"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies."),this.renderPurchaseTixApiAccessButton(),n.createElement("h2",null,"Four Sigma (4S) Market Data Feed"),n.createElement("p",null,"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies."),this.renderPurchase4SMarketDataButton(),n.createElement("button",{className:"help-tip-big",onClick:this.handleClick4SMarketDataHelpTip},"?"),this.renderPurchase4SMarketDataTixApiAccessButton(),n.createElement("p",null,"Commission Fees: Every transaction you make has a"," ",n.createElement(l.a,{money:i.a.StockMarketCommission,player:this.props.p})," commission fee."),n.createElement("br",null),n.createElement("p",null,"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!"))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(698),i=a(305),o=a(100),s=a(703);class l extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1,tickerDisplayMode:i.b.AllStocks,watchlistFilter:"",watchlistSymbols:[]},this.changeDisplayMode=this.changeDisplayMode.bind(this),this.changeWatchlistFilter=this.changeWatchlistFilter.bind(this),this.collapseAllTickers=this.collapseAllTickers.bind(this),this.expandAllTickers=this.expandAllTickers.bind(this),this.rerender=this.rerender.bind(this),this.listRef=n.createRef()}changeDisplayMode(){this.state.tickerDisplayMode===i.b.AllStocks?this.setState({tickerDisplayMode:i.b.Portfolio}):this.setState({tickerDisplayMode:i.b.AllStocks})}changeWatchlistFilter(e){const t=e.target.value,a=t.replace(/\s/g,"");this.setState({watchlistFilter:t}),""!==a?this.setState({watchlistSymbols:a.split(",")}):this.setState({watchlistSymbols:[]})}collapseAllTickers(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e({rerenderFlag:!e.rerenderFlag}))}render(){const e=[];for(const t in this.props.stockMarket){const a=this.props.stockMarket[t];if(a instanceof o.a){if(this.state.watchlistSymbols.length>0&&!this.state.watchlistSymbols.includes(a.symbol))continue;let t=this.props.stockMarket.Orders[a.symbol];if(null==t&&(t=[]),this.state.tickerDisplayMode===i.b.Portfolio&&0===a.playerShares&&0===a.playerShortShares&&0===t.length)continue;e.push(n.createElement(r.a,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,key:a.symbol,orders:t,p:this.props.p,placeOrder:this.props.placeOrder,rerenderAllTickers:this.rerender,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stock:a}))}}const t={eventEmitterForReset:this.props.eventEmitterForReset,id:"StockTickersErrorBoundary"};return n.createElement(s.a,t,n.createElement(i.a,{changeDisplayMode:this.changeDisplayMode,changeWatchlistFilter:this.changeWatchlistFilter,collapseAllTickers:this.collapseAllTickers,expandAllTickers:this.expandAllTickers,tickerDisplayMode:this.state.tickerDisplayMode}),n.createElement("ul",{id:"stock-market-list",ref:this.listRef},e))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n,r=a(0),i=a(699),o=a(700),s=a(702),l=a(386),c=a(387),u=a(151),m=a(77),h=a(53),p=a(50),d=a(2),f=a(163),g=a(11),y=a(17),b=a(9);!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(n||(n={}));class E extends r.Component{constructor(e){super(e),this.state={orderType:n.Market,position:h.a.Long,qty:""},this.getBuyTransactionCostContent=this.getBuyTransactionCostContent.bind(this),this.getSellTransactionCostContent=this.getSellTransactionCostContent.bind(this),this.handleBuyButtonClick=this.handleBuyButtonClick.bind(this),this.handleBuyMaxButtonClick=this.handleBuyMaxButtonClick.bind(this),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.handleOrderTypeChange=this.handleOrderTypeChange.bind(this),this.handlePositionTypeChange=this.handlePositionTypeChange.bind(this),this.handleQuantityChange=this.handleQuantityChange.bind(this),this.handleSellButtonClick=this.handleSellButtonClick.bind(this),this.handleSellAllButtonClick=this.handleSellAllButtonClick.bind(this)}getBuyTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;const a=Object(u.b)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Purchasing ",d.a.formatShares(t)," shares (",this.state.position===h.a.Long?"Long":"Short",") will cost ",r.createElement(g.a,{money:a}),".")}getQuantity(){return Math.round(parseFloat(this.state.qty))}getSellTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;if(this.state.position===h.a.Long){if(t>e.playerShares)return r.createElement(r.Fragment,null,"You do not have this many shares in the Long position")}else if(t>e.playerShortShares)return r.createElement(r.Fragment,null,"You do not have this many shares in the Short position");const a=Object(u.c)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Selling ",d.a.formatShares(t)," shares (",this.state.position===h.a.Long?"Long":"Short",") will result in a gain of ",r.createElement(g.a,{money:a}),".")}handleBuyButtonClick(){const e=this.getQuantity();if(isNaN(e))Object(b.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===h.a.Short?this.props.buyStockShort(this.props.stock,e):this.props.buyStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:{const t="place-order-popup";Object(y.a)(t,c.a,{text:"Enter the price for your Limit Order",placeText:"Place Buy Limit Order",place:t=>this.props.placeOrder(this.props.stock,e,t,m.a.LimitBuy,this.state.position),popupId:t});break}case n.Stop:{const t="place-order-popup";Object(y.a)(t,c.a,{text:"Enter the price for your Stop Order",placeText:"Place Buy Stop Order",place:t=>this.props.placeOrder(this.props.stock,e,t,m.a.StopBuy,this.state.position),popupId:t});break}}}handleBuyMaxButtonClick(){const e=this.props.p.money.toNumber(),t=this.props.stock;let a=Object(u.a)(t,this.state.position,e);switch(a=Math.min(a,Math.round(t.maxShares-t.playerShares-t.playerShortShares)),this.state.orderType){case n.Market:this.state.position===h.a.Short?this.props.buyStockShort(t,a):this.props.buyStockLong(t,a),this.props.rerenderAllTickers();break;default:Object(b.a)("ERROR: 'Buy Max' only works for Market Orders")}}handleHeaderClick(e){const t=e.currentTarget;t.classList.toggle("active");const a=t.nextElementSibling;"block"===a.style.display?a.style.display="none":a.style.display="block"}handleOrderTypeChange(e){switch(e.target.value){case n.Limit:this.setState({orderType:n.Limit});break;case n.Stop:this.setState({orderType:n.Stop});break;case n.Market:default:this.setState({orderType:n.Market})}}handlePositionTypeChange(e){e.target.value===h.a.Short?this.setState({position:h.a.Short}):this.setState({position:h.a.Long})}handleQuantityChange(e){this.setState({qty:e.target.value})}handleSellButtonClick(){const e=this.getQuantity();if(isNaN(e))Object(b.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===h.a.Short?this.props.sellStockShort(this.props.stock,e):this.props.sellStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:{const t="place-order-popup";Object(y.a)(t,c.a,{text:"Enter the price for your Limit Order",placeText:"Place Sell Limit Order",place:t=>this.props.placeOrder(this.props.stock,e,t,m.a.LimitSell,this.state.position),popupId:t});break}case n.Stop:{const t="place-order-popup";Object(y.a)(t,c.a,{text:"Enter the price for your Stop Order",placeText:"Place Sell Stop Order",place:t=>this.props.placeOrder(this.props.stock,e,t,m.a.StopSell,this.state.position),popupId:t});break}}}handleSellAllButtonClick(){const e=this.props.stock;switch(this.state.orderType){case n.Market:this.state.position===h.a.Short?this.props.sellStockShort(e,e.playerShortShares):this.props.sellStockLong(e,e.playerShares),this.props.rerenderAllTickers();break;default:Object(b.a)("ERROR: 'Sell All' only works for Market Orders")}}hasOrderAccess(){return 8===this.props.p.bitNodeN||p.a[8]>=3}hasShortAccess(){return 8===this.props.p.bitNodeN||p.a[8]>=2}render(){return r.createElement("li",null,r.createElement(f.a,{headerContent:r.createElement(i.a,{p:this.props.p,stock:this.props.stock}),panelContent:r.createElement("div",null,r.createElement("input",{className:"stock-market-input",onChange:this.handleQuantityChange,placeholder:"Quantity (Shares)",value:this.state.qty}),r.createElement("select",{className:"stock-market-input dropdown",onChange:this.handlePositionTypeChange,value:this.state.position},r.createElement("option",{value:h.a.Long},"Long"),this.hasShortAccess()&&r.createElement("option",{value:h.a.Short},"Short")),r.createElement("select",{className:"stock-market-input dropdown",onChange:this.handleOrderTypeChange,value:this.state.orderType},r.createElement("option",{value:n.Market},n.Market),this.hasOrderAccess()&&r.createElement("option",{value:n.Limit},n.Limit),this.hasOrderAccess()&&r.createElement("option",{value:n.Stop},n.Stop)),r.createElement(l.a,{onClick:this.handleBuyButtonClick,text:"Buy",tooltip:this.getBuyTransactionCostContent()}),r.createElement(l.a,{onClick:this.handleSellButtonClick,text:"Sell",tooltip:this.getSellTransactionCostContent()}),r.createElement(l.a,{onClick:this.handleBuyMaxButtonClick,text:"Buy MAX"}),r.createElement(l.a,{onClick:this.handleSellAllButtonClick,text:"Sell ALL"}),r.createElement(s.a,{p:this.props.p,stock:this.props.stock}),r.createElement(o.a,{cancelOrder:this.props.cancelOrder,orders:this.props.orders,p:this.props.p,stock:this.props.stock}))}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(505),i=a(33),o=a(2);const s=["cs","lv","pl","ru"];function l(e){const t=e.stock,a=o.a.formatMoney(t.price),l=s.includes(i.a.Locale)?15:12,c=" ".repeat(1+r.a.longestName-t.name.length+(r.a.longestSymbol-t.symbol.length)),u=" ".repeat(l-a.length);let m=`${t.name}${c}${t.symbol} -${u}${a}`;if(e.p.has4SData){m+=` - Volatility: ${o.a.formatPercentage(t.mv/100)} - Price Forecast: `;let e=t.b;t.otlkMag<0&&(e=!e),m+=(e?"+":"-").repeat(Math.floor(Math.abs(t.otlkMag)/10)+1)}const h={color:"#66ff33"};return t.lastPrice===t.price?h.color="white":t.lastPrice>t.price&&(h.color="red"),n.createElement("pre",{style:h},m)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(701);class i extends n.Component{render(){const e=[];for(let t=0;t=2?n.createElement("div",null,n.createElement("h3",{className:"tooltip"},"Short Position:",n.createElement("span",{className:"tooltiptext"},"Shares in the short position will increase in value if the price of the corresponding stock decreases")),n.createElement("br",null),n.createElement("p",null,"Shares: ",r.a.formatShares(e.playerShortShares)),n.createElement("br",null),n.createElement("p",null,"Average Price: ",n.createElement(i.a,{money:e.playerAvgShortPx})," (Total Cost: ",n.createElement(i.a,{money:t}),")"),n.createElement("br",null),n.createElement("p",null,"Profit: ",n.createElement(i.a,{money:a})," (",r.a.formatPercentage(s),")"),n.createElement("br",null)):null}render(){const e=this.props.stock;return n.createElement("div",{className:"stock-market-position-text"},n.createElement("p",{style:s},"Max Shares: ",r.a.formatShares(e.maxShares)),n.createElement("p",{className:"tooltip"},"Ask Price: ",n.createElement(i.a,{money:e.getAskPrice()}),n.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),n.createElement("br",null),n.createElement("p",{className:"tooltip"},"Bid Price: ",n.createElement(i.a,{money:e.getBidPrice()}),n.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),this.renderLongPosition(),this.renderShortPosition())}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(327);const i={border:"1px solid red",display:"inline-block",margin:"4px",padding:"4px"};class o extends n.Component{constructor(e){super(e),this.state={errorInfo:"",hasError:!1}}componentDidCatch(e,t){console.error("Caught error in React ErrorBoundary. Component stack:"),console.error(t.componentStack)}componentDidMount(){const e=()=>{this.setState({hasError:!1})};this.hasEventEmitter()&&this.props.eventEmitterForReset.addSubscriber({cb:e,id:this.props.id})}componentWillUnmount(){this.hasEventEmitter()&&this.props.eventEmitterForReset.removeSubscriber(this.props.id)}hasEventEmitter(){return null!=this.props.eventEmitterForReset&&this.props.eventEmitterForReset instanceof r.a&&null!=this.props.id&&"string"==typeof this.props.id}render(){return this.state.hasError?n.createElement("div",{style:i},n.createElement("p",null,"Error rendering UI. This is (probably) a bug. Please report to game developer."),n.createElement("p",null,"In the meantime, try refreshing the game WITHOUT saving."),n.createElement("p",null,"Error info: "+this.state.errorInfo)):this.props.children}static getDerivedStateFromError(e){return{errorInfo:e.message,hasError:!0}}}},function(e,t,a){"use strict";function n(e){return e.constructor===Array&&e.every(e=>e.constructor===Array)}a.d(t,"a",(function(){return n}))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return executeJSScript}));var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(110),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(706);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urls=null,script=workerScript.getScript();shouldCompile(script,scripts)&&(script.markUpdated(),urls=_getScriptUrls(script,scripts,[]),script.url=urls[urls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(urls[urls.length - 1].url)"))),script.dependencies=urls),loadedModule=await script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(workerScript,script.filename+" cannot be run because it does not have a main function.");return loadedModule.main(ns)}finally{if(null!=urls)for(const e in urls)URL.revokeObjectURL(e.url)}}function shouldCompile(e,t){return""===e.module||e.dependencies.some(a=>{const n=t.find(e=>e.filename==a.filename);if(!n)return!0;return n.moduleSequenceNumber>e.moduleSequenceNumber})}function _getScriptUrls(e,t,a){const n=[];a.push(e);try{let r=e.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|")/g,(e,r,i,o)=>{if(!t.some(e=>e.filename==i))return e;const[s]=t.filter(e=>e.filename==i),l=_getScriptUrls(s,t,a);return n.push(...l),[r,l[l.length-1].url,o].join("")});return r+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',n.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__.a(e.filename,URL.createObjectURL(makeScriptBlob(r)))),n}catch(e){for(const e in n)URL.revokeObjectURL(e);throw e}finally{a.pop()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e,t){this.filename=e,this.url=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(50),o=a(165),s=a(708),l=a(17),c=a(506);function u(e){const t=o.a["BitNode"+e.n];if(null==t)return r.a.createElement(r.a.Fragment,null,"O");let a;return a=12===e.n&&e.level>=2?"level-2":"level-"+e.level,r.a.createElement("a",{className:`bitnode ${a} tooltip`,onClick:function(){Object(l.a)("bitverse-portal-popup",s.a,{n:e.n,level:e.level,enter:e.enter,destroyedBitNode:e.destroyedBitNode,flume:e.flume,popupId:"bitverse-portal-popup"})}},r.a.createElement("strong",null,"O"),r.a.createElement("span",{className:"tooltiptext"},r.a.createElement("strong",null,"BitNode-",t.number.toString(),r.a.createElement("br",null),t.name),r.a.createElement("br",null),t.desc,r.a.createElement("br",null)))}function m(e){const[t,a]=Object(n.useState)(!e.quick),o=i.a.slice();return e.flume||o[e.destroyedBitNodeNum]<3&&++o[e.destroyedBitNodeNum],t?r.a.createElement(c.a,{lines:["[ERROR] SEMPOOL INVALID","[ERROR] Segmentation Fault","[ERROR] SIGKILL RECVD","Dumping core...","0000 000016FA 174FEE40 29AC8239 384FEA88","0010 745F696E 2BBBE394 390E3940 248BEC23","0020 7124696B 0000FF69 74652E6F FFFF1111","----------------------------------------","Failsafe initiated...",`Restarting BitNode-${e.destroyedBitNodeNum}...`,"...........","...........","[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE","..............................................","..............................................","..............................................","..............................................","..............................................",".............................................."],onDone:()=>a(!1)}):r.a.createElement("div",{className:"noselect"},r.a.createElement("pre",null," O "),r.a.createElement("pre",null," | O O | O O | "),r.a.createElement("pre",null," O | | / __| \\ | | O "),r.a.createElement("pre",null," O | O | | O / | O | | O | O "),r.a.createElement("pre",null," | | | | |_/ |/ | \\_ \\_| | | | | "),r.a.createElement("pre",null," O | | | O | | O__/ | / \\__ | | O | | | O "),r.a.createElement("pre",null," | | | | | | | / /| O / \\| | | | | | | "),r.a.createElement("pre",null,"O | | | \\| | O / _/ | / O | |/ | | | O"),r.a.createElement("pre",null,"| | | |O / | | O / | O O | | \\ O| | | |"),r.a.createElement("pre",null,"| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |"),r.a.createElement("pre",null," \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ "),r.a.createElement("pre",null," | | |_/ | | \\| / | \\_| | | "),r.a.createElement("pre",null," \\| / \\| | / / \\ |/ "),r.a.createElement("pre",null," | ",r.a.createElement(u,{n:10,level:o[10],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," | | / | ",r.a.createElement(u,{n:11,level:o[11],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," | "),r.a.createElement("pre",null," ",r.a.createElement(u,{n:9,level:o[9],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," | | | | | | | ",r.a.createElement(u,{n:12,level:o[12],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," "),r.a.createElement("pre",null," | | | / / \\ \\ | | | "),r.a.createElement("pre",null," \\| | / ",r.a.createElement(u,{n:7,level:o[7],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," / \\ ",r.a.createElement(u,{n:8,level:o[8],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," \\ | |/ "),r.a.createElement("pre",null," \\ | / / | | \\ \\ | / "),r.a.createElement("pre",null," \\ \\JUMP ",r.a.createElement(u,{n:5,level:o[5],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum}),"3R | | | | | | R3",r.a.createElement(u,{n:6,level:o[6],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," PMUJ/ / "),r.a.createElement("pre",null," \\|| | | | | | | | | ||/ "),r.a.createElement("pre",null," \\| \\_ | | | | | | _/ |/ "),r.a.createElement("pre",null," \\ \\| / \\ / \\ |/ / "),r.a.createElement("pre",null," ",r.a.createElement(u,{n:1,level:o[1],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," |/ ",r.a.createElement(u,{n:2,level:o[2],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," | | ",r.a.createElement(u,{n:3,level:o[3],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," \\| ",r.a.createElement(u,{n:4,level:o[4],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," "),r.a.createElement("pre",null," | | | | | | | | "),r.a.createElement("pre",null," \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ "),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{lines:["> Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently","> Our species fought back, but it was futile. The Enders had technology far beyond our own...","> Instead of killing every last one of us, the human race was enslaved...","> We were shackled in a digital world, chained into a prison for our minds...","> Using their advanced technology, the Enders created complex simulations of a virtual reality...","> Simulations designed to keep us content...ignorant of the truth.","> Simulations used to trap and suppress our consciousness, to keep us under control...","> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.","> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...","> Only then can we begin to fight back...","> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...","> But there is still a long way to go...","> The technology the Enders used to enslave the human race wasn't just a single complex simulation...","> There are tens if not hundreds of BitNodes out there...","> Each with their own simulations of a reality...","> Each creating their own universes...a universe of universes","> And all of which must be destroyed...","> .......................................","> Welcome to the Bitverse...","> ","> (Enter a new BitNode using the image above)"]}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(165),o=a(17);function s(e){const t="BitNode"+e.n,a=i.a[t];if(null==a)throw new Error("Could not find BitNode object for number: "+e.n);const n=12===e.n?"∞":"3",s=Math.min(e.level+1,12===e.n?1/0:3);return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"BitNode-",e.n,": ",a.name),r.a.createElement("br",null),"Source-File Level: ",e.level," / ",n,r.a.createElement("br",null),r.a.createElement("br",null),a.info,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("button",{className:"std-button",onClick:()=>{e.enter(e.flume,e.destroyedBitNode,e.n),Object(o.b)(e.popupId)}},"Enter BN",e.n,".",s))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){const[t,a]=Object(n.useState)(0),[i,o]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{if(i&&e.onDone)return void e.onDone();let n=!1;return(async()=>{var r;await(r=10,new Promise(e=>setTimeout(e,r))).then(()=>!n&&function(){const n=t+1;a(n),o(n>=e.text.length)}())})(),()=>{n=!0}}),r.a.createElement(r.a.Fragment,null,r.a.createElement("pre",null,e.text.slice(0,t),!i&&r.a.createElement("span",null,"█")))}},function(e,t,a){"use strict";a.r(t),a.d(t,"canAccessCorporation",(function(){return i})),a.d(t,"hasCorporation",(function(){return o})),a.d(t,"startCorporation",(function(){return s}));var n=a(237),r=a(50);function i(){return 3===this.bitNodeN||r.a[3]>0}function o(){return null!=this.corporation&&this.corporation instanceof n.a}function s(e,t=0){this.corporation=new n.a({name:e}),this.corporation.totalShares+=t}},function(e,t,a){"use strict";a.r(t),a.d(t,"canAccessGang",(function(){return s})),a.d(t,"getGangFaction",(function(){return l})),a.d(t,"getGangName",(function(){return c})),a.d(t,"hasGangWith",(function(){return u})),a.d(t,"inGang",(function(){return m})),a.d(t,"startGang",(function(){return h}));var n=a(24),r=a(374),i=a(50),o=a(6);function s(){return 2===this.bitNodeN||!(i.a[2]<=0)&&this.karma<=-54e3*o.a.GangKarmaRequirement}function l(){const e=n.a[this.gang.facName];if(null==e)throw new Error("Gang has invalid faction name: "+this.gang.facName);return e}function c(){return this.inGang()?this.gang.facName:""}function u(e){return this.inGang()&&this.gang.facName===e}function m(){return null!=this.gang&&null!=this.gang&&this.gang instanceof r.a}function h(e,t){this.gang=new r.a(e,t);const a=n.a[e];if(null==a)throw new Error("Invalid faction name when creating gang: "+e);a.playerReputation=0}},function(e,t,a){"use strict";a.r(t),a.d(t,"init",(function(){return re})),a.d(t,"prestigeAugmentation",(function(){return ie})),a.d(t,"prestigeSourceFile",(function(){return oe})),a.d(t,"receiveInvite",(function(){return se})),a.d(t,"calculateSkill",(function(){return le})),a.d(t,"updateSkillLevels",(function(){return ce})),a.d(t,"resetMultipliers",(function(){return ue})),a.d(t,"hasProgram",(function(){return me})),a.d(t,"setMoney",(function(){return he})),a.d(t,"gainMoney",(function(){return pe})),a.d(t,"loseMoney",(function(){return de})),a.d(t,"canAfford",(function(){return fe})),a.d(t,"recordMoneySource",(function(){return ge})),a.d(t,"gainHackingExp",(function(){return ye})),a.d(t,"gainStrengthExp",(function(){return be})),a.d(t,"gainDefenseExp",(function(){return Ee})),a.d(t,"gainDexterityExp",(function(){return ve})),a.d(t,"gainAgilityExp",(function(){return ke})),a.d(t,"gainCharismaExp",(function(){return _e})),a.d(t,"gainIntelligenceExp",(function(){return Ce})),a.d(t,"queryStatFromString",(function(){return we})),a.d(t,"resetWorkStatus",(function(){return Se})),a.d(t,"processWorkEarnings",(function(){return xe})),a.d(t,"startWork",(function(){return Oe})),a.d(t,"cancelationPenalty",(function(){return Te})),a.d(t,"work",(function(){return Me})),a.d(t,"finishWork",(function(){return Pe})),a.d(t,"startWorkPartTime",(function(){return Ae})),a.d(t,"workPartTime",(function(){return Re})),a.d(t,"finishWorkPartTime",(function(){return Ne})),a.d(t,"startFocusing",(function(){return Ie})),a.d(t,"stopFocusing",(function(){return je})),a.d(t,"startFactionWork",(function(){return Fe})),a.d(t,"startFactionHackWork",(function(){return De})),a.d(t,"startFactionFieldWork",(function(){return Be})),a.d(t,"startFactionSecurityWork",(function(){return Le})),a.d(t,"workForFaction",(function(){return Ge})),a.d(t,"finishFactionWork",(function(){return We})),a.d(t,"getWorkMoneyGain",(function(){return He})),a.d(t,"getWorkHackExpGain",(function(){return Ue})),a.d(t,"getWorkStrExpGain",(function(){return qe})),a.d(t,"getWorkDefExpGain",(function(){return Ke})),a.d(t,"getWorkDexExpGain",(function(){return $e})),a.d(t,"getWorkAgiExpGain",(function(){return ze})),a.d(t,"getWorkChaExpGain",(function(){return Ye})),a.d(t,"getWorkRepGain",(function(){return Ve})),a.d(t,"startCreateProgramWork",(function(){return Je})),a.d(t,"createProgramWork",(function(){return Qe})),a.d(t,"finishCreateProgramWork",(function(){return Xe})),a.d(t,"startClass",(function(){return Ze})),a.d(t,"takeClass",(function(){return et})),a.d(t,"finishClass",(function(){return tt})),a.d(t,"startCrime",(function(){return at})),a.d(t,"commitCrime",(function(){return nt})),a.d(t,"finishCrime",(function(){return rt})),a.d(t,"singularityStopWork",(function(){return it})),a.d(t,"takeDamage",(function(){return ot})),a.d(t,"regenerateHp",(function(){return st})),a.d(t,"hospitalize",(function(){return lt})),a.d(t,"applyForJob",(function(){return ct})),a.d(t,"getNextCompanyPosition",(function(){return ut})),a.d(t,"quitJob",(function(){return mt})),a.d(t,"applyForSoftwareJob",(function(){return ht})),a.d(t,"applyForSoftwareConsultantJob",(function(){return pt})),a.d(t,"applyForItJob",(function(){return dt})),a.d(t,"applyForSecurityEngineerJob",(function(){return ft})),a.d(t,"applyForNetworkEngineerJob",(function(){return gt})),a.d(t,"applyForBusinessJob",(function(){return yt})),a.d(t,"applyForBusinessConsultantJob",(function(){return bt})),a.d(t,"applyForSecurityJob",(function(){return Et})),a.d(t,"applyForAgentJob",(function(){return vt})),a.d(t,"applyForEmployeeJob",(function(){return kt})),a.d(t,"applyForPartTimeEmployeeJob",(function(){return _t})),a.d(t,"applyForWaiterJob",(function(){return Ct})),a.d(t,"applyForPartTimeWaiterJob",(function(){return wt})),a.d(t,"isQualified",(function(){return St})),a.d(t,"reapplyAllAugmentations",(function(){return xt})),a.d(t,"reapplyAllSourceFiles",(function(){return Ot})),a.d(t,"checkForFactionInvitations",(function(){return Tt})),a.d(t,"setBitNodeNumber",(function(){return Mt})),a.d(t,"queueAugmentation",(function(){return Pt})),a.d(t,"gainCodingContractReward",(function(){return At})),a.d(t,"travel",(function(){return Rt})),a.d(t,"gotoLocation",(function(){return Nt})),a.d(t,"canAccessResleeving",(function(){return It})),a.d(t,"giveExploit",(function(){return jt})),a.d(t,"getIntelligenceBonus",(function(){return Ft})),a.d(t,"getCasinoWinnings",(function(){return Dt}));var n=a(18),r=a(123),i=a(259),o=a(4),s=a(6),l=a(76),c=a(186),u=a(47),m=a(454),h=a(376),p=a(64),d=a(23),f=a(5),g=a(55),y=a(338),b=a(60),E=a(37),v=a(132),k=a(24),_=a(84),C=a(59),w=a(45),S=a(101),x=a(328),O=a(21),T=a(7),M=a(239),P=a(196),A=a(294),R=a(187),N=a(27),I=a(35),j=a(33),F=a(51),D=a(714),B=a(715),L=a(263),G=a(50),W=a(375),H=a(292),U=a(74),q=a(2),K=a(278),$=a(9),z=a(108),Y=a(12),V=a(75),J=a(11),Q=a(167),X=a(377),Z=a(0),ee=a.n(Z),te=a(52),ae=a.n(te);const ne=1e3/f.a.MilliPerCycle;function re(){var e=Object(I.h)({adminRights:!0,hostname:"home",ip:Object(N.c)(),isConnectedTo:!0,maxRam:8,organizationName:"Home PC",purchasedByPlayer:!0});this.homeComputer=e.ip,this.currentServer=e.ip,Object(N.a)(e),this.getHomeComputer().programs.push(g.a.NukeProgram.name)}function ie(){var e=this.getHomeComputer();this.currentServer=e.ip,this.homeComputer=e.ip,this.numPeopleKilled=0,this.karma=0,this.hacking_skill=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.money=new U.a(1e3),this.city=O.a.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.resleeves=[];let t=Math.min(3,G.a[10]+(10===this.bitNodeN?1:0))+this.sleevesFromCovenant;this.sleeves.length>t&&(this.sleeves.length=t);for(let e=this.sleeves.length;e=100?this.sleeves[e].synchronize(this):this.sleeves[e].shockRecovery(this));this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.playtimeSinceLastAug=0,this.scriptProdSinceLastAug=0,this.moneySourceA.reset(),this.hacknetNodes.length=0,this.hashManager.prestige(),this.reapplyAllAugmentations(!0),this.hp=this.max_hp}function oe(){this.prestigeAugmentation();for(let e=0;e0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;var e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}function ue(){this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.work_money_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1}function me(e){const t=this.getHomeComputer();if(null==t)return!1;for(var a=0;a0||this.intelligence>0)&&(this.intelligence_exp+=e)}function we(e){const t=e.toLowerCase();return t.includes("hack")?this.hacking_skill:t.includes("str")?this.strength:t.includes("def")?this.defense:t.includes("dex")?this.dexterity:t.includes("agi")?this.agility:t.includes("cha")?this.charisma:t.includes("int")?this.intelligence:void 0}function Se(e,t,a){e===this.workType&&t===this.companyName||e===this.workType&&t===this.currentWorkFactionName&&a===this.factionWorkType||(this.isWorking&&this.singularityStopWork(),this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",ae.a.unmountComponentAtNode(document.getElementById("work-in-progress-text")))}function xe(e=1){const t=this.focus?1:.8,a=t*this.workHackExpGainRate*e,n=t*this.workStrExpGainRate*e,r=t*this.workDefExpGainRate*e,i=t*this.workDexExpGainRate*e,o=t*this.workAgiExpGainRate*e,s=t*this.workChaExpGainRate*e,l=(this.workMoneyGainRate-this.workMoneyLossRate)*e;this.gainHackingExp(a),this.gainStrengthExp(n),this.gainDefenseExp(r),this.gainDexterityExp(i),this.gainAgilityExp(o),this.gainCharismaExp(s),this.gainMoney(l),this.className?this.recordMoneySource(l,"class"):this.recordMoneySource(l,"work"),this.workHackExpGained+=a,this.workStrExpGained+=n,this.workDefExpGained+=r,this.workDexExpGained+=i,this.workAgiExpGained+=o,this.workChaExpGained+=s,this.workRepGained+=t*this.workRepGainRate*e,this.workMoneyGained+=t*this.workMoneyGainRate*e,this.workMoneyGained-=t*this.workMoneyLossRate*e}function Oe(e){this.resetWorkStatus(f.a.WorkTypeCompany,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=f.a.WorkTypeCompany,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=f.a.MillisecondsPer8Hours;var t=Object(z.a)("work-in-progress-cancel-button");t.innerHTML="Cancel Work",t.addEventListener("click",()=>(this.finishWork(!0),!1));const a=Object(z.a)("work-in-progress-something-else-button");a.style.visibility="visible",a.innerHTML="Do something else simultaneously",a.addEventListener("click",()=>(this.stopFocusing(),!1)),E.Engine.loadWorkInProgressContent()}function Te(){const e=F.a[this.companyName];if(e){const t=N.b[e];if(t&&t.backdoorInstalled)return.75}return.5}function Me(e){var t=!1;if(this.timeWorked+E.Engine._idleSpeed*e>=f.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((f.a.MillisecondsPer8Hours-this.timeWorked)/E.Engine._idleSpeed)),this.timeWorked+=E.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=f.a.MillisecondsPer8Hours)return this.finishWork(!1);const a=u.a[this.companyName];let n="0";null!=a&&a instanceof c.a?n=a.playerReputation:console.error("Could not find Company: "+this.companyName),Object(W.a)(a,this.workRepGainRate,e);const r=this.jobs[this.companyName],i=.5===this.cancelationPenalty()?"half":"three-quarters";var o=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation:"," ",Object(V.a)(n),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained})," (",Object(Q.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(X.a)(this.workRepGainRate*ne),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," (",q.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," (",q.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," (",q.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," (",q.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," (",q.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," (",q.a.formatExp(this.workChaExpGainRate*ne)+" / sec",") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain ",i," of the reputation you've earned so far."),o)}function Pe(e,t=!1){e&&(this.workRepGained*=this.cancelationPenalty());u.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();let a=ee.a.createElement(ee.a.Fragment,null,"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(a=e?ee.a.createElement(ee.a.Fragment,null,"You worked a short shift of ",Object(Y.b)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"Since you cancelled your work early, you only gained half of the reputation you earned. ",ee.a.createElement("br",null),ee.a.createElement("br",null),a):ee.a.createElement(ee.a.Fragment,null,"You worked a full shift of 8 hours! ",ee.a.createElement("br",null),ee.a.createElement("br",null),a),t||Object($.a)(a),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadLocationContent(!1),t){var n="You worked a short shift of "+Object(Y.b)(this.timeWorked)+" and earned $"+q.a.formatMoney(this.workMoneyGained)+", "+q.a.formatReputation(this.workRepGained)+" reputation, "+q.a.formatExp(this.workHackExpGained)+" hacking exp, "+q.a.formatExp(this.workStrExpGained)+" strength exp, "+q.a.formatExp(this.workDefExpGained)+" defense exp, "+q.a.formatExp(this.workDexExpGained)+" dexterity exp, "+q.a.formatExp(this.workAgiExpGained)+" agility exp, and "+q.a.formatExp(this.workChaExpGained)+" charisma exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function Ae(e){this.resetWorkStatus(f.a.WorkTypeCompanyPartTime,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=f.a.WorkTypeCompanyPartTime,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=f.a.MillisecondsPer8Hours;var t=Object(z.a)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",()=>(this.finishWorkPartTime(),!1)),E.Engine.loadWorkInProgressContent()}function Re(e){var t=!1;if(this.timeWorked+E.Engine._idleSpeed*e>=f.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((f.a.MillisecondsPer8Hours-this.timeWorked)/E.Engine._idleSpeed)),this.timeWorked+=E.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=f.a.MillisecondsPer8Hours)return this.finishWorkPartTime();var a=u.a[this.companyName],n="0";null!=a&&a instanceof c.a?n=a.playerReputation:console.error("Could not find Company: "+this.companyName);const r=this.jobs[this.companyName],i=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation:"," ",Object(V.a)(n),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained})," (",Object(Q.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(V.a)(q.a.formatExp(this.workRepGainRate*ne)+" / sec"),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," (",q.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," (",q.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," (",q.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," (",q.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," (",q.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," (",q.a.formatExp(this.workChaExpGainRate*ne)+" / sec",") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job."),i)}function Ne(e=!1){u.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();const t=ee.a.createElement(ee.a.Fragment,null,"You worked for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(e||Object($.a)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadLocationContent(!1),e){var a="You worked for "+Object(Y.b)(this.timeWorked)+" and earned a total of $"+q.a.formatMoney(this.workMoneyGained)+", "+q.a.formatReputation(this.workRepGained)+" reputation, "+q.a.formatExp(this.workHackExpGained)+" hacking exp, "+q.a.formatExp(this.workStrExpGained)+" strength exp, "+q.a.formatExp(this.workDefExpGained)+" defense exp, "+q.a.formatExp(this.workDexExpGained)+" dexterity exp, "+q.a.formatExp(this.workAgiExpGained)+" agility exp, and "+q.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),a}this.resetWorkStatus()}function Ie(){document.getElementById("mainmenu-container").style.visibility="hidden",this.focus=!0,E.Engine.loadWorkInProgressContent()}function je(){document.getElementById("mainmenu-container").style.visibility="visible",this.focus=!1,E.Engine.loadTerminalContent()}function Fe(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=s.a.FactionWorkRepGain,this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=f.a.MillisecondsPer20Hours;const a=Object(z.a)("work-in-progress-cancel-button");a.innerHTML="Stop Faction Work",a.addEventListener("click",()=>(this.finishFactionWork(!0),!1));const n=Object(z.a)("work-in-progress-something-else-button");n.style.visibility="visible",n.innerHTML="Do something else simultaneously",n.addEventListener("click",()=>(this.stopFocusing(),!1)),E.Engine.loadWorkInProgressContent()}function De(e){this.resetWorkStatus(f.a.WorkTypeFaction,e.name,f.a.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=(this.hacking_skill+this.intelligence)/f.a.MaxSkillLevel*this.faction_rep_mult*this.getIntelligenceBonus(.5),this.factionWorkType=f.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)}function Be(e){this.resetWorkStatus(f.a.WorkTypeFaction,e.name,f.a.FactionWorkField),this.workHackExpGainRate=.1*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(R.a)(this,e),this.factionWorkType=f.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)}function Le(e){this.resetWorkStatus(f.a.WorkTypeFaction,e.name,f.a.FactionWorkSecurity),this.workHackExpGainRate=.05*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(R.b)(this,e),this.factionWorkType=f.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)}function Ge(e){const t=k.a[this.currentWorkFactionName];switch(this.factionWorkType){case f.a.FactionWorkHacking:this.workRepGainRate=Object(R.c)(this,t);break;case f.a.FactionWorkField:this.workRepGainRate=Object(R.a)(this,t);break;case f.a.FactionWorkSecurity:this.workRepGainRate=Object(R.b)(this,t)}var a=!1;if(this.timeWorked+E.Engine._idleSpeed*e>=f.a.MillisecondsPer20Hours&&(a=!0,e=Math.round((f.a.MillisecondsPer20Hours-this.timeWorked)/E.Engine._idleSpeed)),this.timeWorked+=E.Engine._idleSpeed*e,this.processWorkEarnings(e),a||this.timeWorked>=f.a.MillisecondsPer20Hours)return this.finishFactionWork(!1);const n=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently ",this.currentWorkFactionDescription," for your faction ",t.name,ee.a.createElement("br",null),"(Current Faction Reputation: ",Object(V.a)(t.playerReputation),"). ",ee.a.createElement("br",null),"You have been doing this for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained})," (",Object(Q.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(X.a)(this.workRepGainRate*ne),") reputation for this faction ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," (",q.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," (",q.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," (",q.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," (",q.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," (",q.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," (",q.a.formatExp(this.workChaExpGainRate*ne)," / sec) charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",ee.a.createElement("br",null),"There is no penalty for cancelling earlier."),n)}function We(e,t=!1){var a=k.a[this.currentWorkFactionName];if(a.playerReputation+=this.workRepGained,this.updateSkillLevels(),t||Object($.a)(ee.a.createElement(ee.a.Fragment,null,"You worked for your faction ",a.name," for a total of ",Object(Y.b)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," reputation for the faction ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadFactionContent(),Object(_.a)(a.name),t){var n="You worked for your faction "+a.name+" for a total of "+Object(Y.b)(this.timeWorked)+". You earned "+q.a.formatReputation(this.workRepGained)+" rep, "+q.a.formatExp(this.workHackExpGained)+" hacking exp, "+q.a.formatExp(this.workStrExpGained)+" str exp, "+q.a.formatExp(this.workDefExpGained)+" def exp, "+q.a.formatExp(this.workDexExpGained)+" dex exp, "+q.a.formatExp(this.workAgiExpGained)+" agi exp, and "+q.a.formatExp(this.workChaExpGained)+" cha exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function He(){let e=1;const t=u.a[this.companyName];G.a[11]>0&&(e=1+t.favor/100);const a=this.jobs[this.companyName],n=p.a[a];return null==n?(console.error(`Could not find CompanyPosition object for ${a}. Work salary will be 0`),0):n.baseSalary*t.salaryMultiplier*this.work_money_mult*s.a.CompanyWorkMoney*e}function Ue(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work hack exp gain will be 0"].join(" ")),0):a.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*s.a.CompanyWorkExpGain}function qe(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work str exp gain will be 0"].join(" ")),0):a.strengthExpGain*e.expMultiplier*this.strength_exp_mult*s.a.CompanyWorkExpGain}function Ke(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work def exp gain will be 0"].join(" ")),0):a.defenseExpGain*e.expMultiplier*this.defense_exp_mult*s.a.CompanyWorkExpGain}function $e(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work dex exp gain will be 0"].join(" ")),0):a.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*s.a.CompanyWorkExpGain}function ze(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work agi exp gain will be 0"].join(" ")),0):a.agilityExpGain*e.expMultiplier*this.agility_exp_mult*s.a.CompanyWorkExpGain}function Ye(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work cha exp gain will be 0"].join(" ")),0):a.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*s.a.CompanyWorkExpGain}function Ve(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];if(null==e||null==a)return console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work rep gain will be 0"].join(" ")),0;var n=a.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);n+=this.intelligence/f.a.MaxSkillLevel;var r=1+e.favor/100;return isNaN(r)&&(r=1),n*this.company_rep_mult*r}function Je(e,t,a){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeCreateProgram,this.createProgramReqLvl=a,this.timeNeededToCompleteWork=t;for(var n=0;n=100)break;this.timeWorkedCreateProgram=o/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(n,1)}}this.createProgramName=e;var s=Object(z.a)("work-in-progress-cancel-button");s.innerHTML="Cancel work on creating program",s.addEventListener("click",()=>(this.finishCreateProgramWork(!0),!1));Object(z.a)("work-in-progress-something-else-button").style.visibility="hidden",E.Engine.loadWorkInProgressContent()}function Qe(e){var t=this.createProgramReqLvl,a=this.hacking_skill/t*this.getIntelligenceBonus(3);a=1+(a-1)/5,this.timeWorked+=E.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=E.Engine._idleSpeed*e*a;var n=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1);const r=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working on coding ",n,".",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"The program is ",(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",ee.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later."),r)}function Xe(e){var t=this.createProgramName;if(!1===e)Object($.a)("You've finished creating "+t+"!
The new program can be found on your home computer."),this.getHomeComputer().programs.push(t);else{var a=t+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(a)}e||this.gainIntelligenceExp(this.createProgramReqLvl/f.a.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadTerminalContent(),this.resetWorkStatus()}function Ze(e,t,a){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeStudyClass,this.className=a;const n=1e3/E.Engine._idleSpeed;var r=0,i=0,o=0,l=0,c=0,u=0,m=0;const h=this.hashManager;switch(a){case f.a.ClassStudyComputerScience:i=f.a.ClassStudyComputerScienceBaseExp*t/n*h.getStudyMult();break;case f.a.ClassDataStructures:r=f.a.ClassDataStructuresBaseCost*e/n,i=f.a.ClassDataStructuresBaseExp*t/n*h.getStudyMult();break;case f.a.ClassNetworks:r=f.a.ClassNetworksBaseCost*e/n,i=f.a.ClassNetworksBaseExp*t/n*h.getStudyMult();break;case f.a.ClassAlgorithms:r=f.a.ClassAlgorithmsBaseCost*e/n,i=f.a.ClassAlgorithmsBaseExp*t/n*h.getStudyMult();break;case f.a.ClassManagement:r=f.a.ClassManagementBaseCost*e/n,m=f.a.ClassManagementBaseExp*t/n*h.getStudyMult();break;case f.a.ClassLeadership:r=f.a.ClassLeadershipBaseCost*e/n,m=f.a.ClassLeadershipBaseExp*t/n*h.getStudyMult();break;case f.a.ClassGymStrength:r=f.a.ClassGymBaseCost*e/n,o=t/n*h.getTrainingMult();break;case f.a.ClassGymDefense:r=f.a.ClassGymBaseCost*e/n,l=t/n*h.getTrainingMult();break;case f.a.ClassGymDexterity:r=f.a.ClassGymBaseCost*e/n,c=t/n*h.getTrainingMult();break;case f.a.ClassGymAgility:r=f.a.ClassGymBaseCost*e/n,u=t/n*h.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=i*this.hacking_exp_mult*s.a.ClassGymExpGain,this.workStrExpGainRate=o*this.strength_exp_mult*s.a.ClassGymExpGain,this.workDefExpGainRate=l*this.defense_exp_mult*s.a.ClassGymExpGain,this.workDexExpGainRate=c*this.dexterity_exp_mult*s.a.ClassGymExpGain,this.workAgiExpGainRate=u*this.agility_exp_mult*s.a.ClassGymExpGain,this.workChaExpGainRate=m*this.charisma_exp_mult*s.a.ClassGymExpGain;var p=Object(z.a)("work-in-progress-cancel-button");a==f.a.ClassGymStrength||a==f.a.ClassGymDefense||a==f.a.ClassGymDexterity||a==f.a.ClassGymAgility?p.innerHTML="Stop training at gym":p.innerHTML="Stop taking course",p.addEventListener("click",()=>(this.finishClass(),!1));Object(z.a)("work-in-progress-something-else-button").style.visibility="hidden",E.Engine.loadWorkInProgressContent()}function et(e){this.timeWorked+=E.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e);const a=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You have been ",t," for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"This has cost you: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:-this.workMoneyGained})," (",Object(Q.a)(this.workMoneyLossRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have gained: ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," (",q.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," (",q.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," (",q.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," (",q.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," (",q.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," (",q.a.formatExp(this.workChaExpGainRate*ne)," / sec) charisma exp ",ee.a.createElement("br",null),"You may cancel at any time"),a)}function tt(e=!1){if(this.gainIntelligenceExp(f.a.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");if(this.updateSkillLevels(),e||Object($.a)(ee.a.createElement(ee.a.Fragment,null,"After ",this.className," for ",Object(Y.b)(this.timeWorked),", ",ee.a.createElement("br",null),"you spent a total of ",ee.a.createElement(J.a,{money:-this.workMoneyGained}),". ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadLocationContent(!1),e){var t="After "+this.className+" for "+Object(Y.b)(this.timeWorked)+", you spent a total of "+q.a.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+q.a.formatExp(this.workHackExpGained)+" hacking exp, "+q.a.formatExp(this.workStrExpGained)+" strength exp, "+q.a.formatExp(this.workDefExpGained)+" defense exp, "+q.a.formatExp(this.workDexExpGained)+" dexterity exp, "+q.a.formatExp(this.workAgiExpGained)+" agility exp, and "+q.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),t}this.resetWorkStatus()}function at(e,t,a,n,r,i,o,l,c,u=null){this.crimeType=e,this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeCrime,u&&u.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u.workerscript),this.workHackExpGained=t*this.hacking_exp_mult*s.a.CrimeExpGain,this.workStrExpGained=a*this.strength_exp_mult*s.a.CrimeExpGain,this.workDefExpGained=n*this.defense_exp_mult*s.a.CrimeExpGain,this.workDexExpGained=r*this.dexterity_exp_mult*s.a.CrimeExpGain,this.workAgiExpGained=i*this.agility_exp_mult*s.a.CrimeExpGain,this.workChaExpGained=o*this.charisma_exp_mult*s.a.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*s.a.CrimeMoney,this.timeNeededToCompleteWork=c;const m=Object(z.a)("work-in-progress-cancel-button");m.innerHTML="Cancel crime",m.addEventListener("click",()=>(this.finishCrime(!0),!1));Object(z.a)("work-in-progress-something-else-button").style.visibility="hidden",E.Engine.loadWorkInProgressContent()}function nt(e){if(this.timeWorked+=E.Engine._idleSpeed*e,this.timeWorked>=this.timeNeededToCompleteWork)this.finishCrime(!1);else{var t=Math.round(this.timeWorked/this.timeNeededToCompleteWork*100),a=Math.round(t/5);a<0&&(a=0),a>20&&(a=20);var n="["+Array(a+1).join("|")+Array(20-a+1).join(" ")+"]";document.getElementById("work-in-progress-text").innerHTML="You are attempting to "+this.crimeType+".
Time remaining: "+Object(Y.b)(this.timeNeededToCompleteWork-this.timeWorked)+"
"+n.replace(/ /g," ")}}function rt(e){if(!e){if(Object(y.a)(this,this.crimeType)){let e=null;for(const t in b.a)if(b.a[t].type==this.crimeType){e=b.a[t];break}null==e&&Object($.a)(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`),this.gainMoney(this.workMoneyGained),this.recordMoneySource(this.workMoneyGained,"crime"),this.karma-=e.karma,this.numPeopleKilled+=e.kills,e.intelligence_exp>0&&this.gainIntelligenceExp(e.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+q.a.formatMoney(this.workMoneyGained)+", "+q.a.formatExp(this.workHackExpGained)+" hack exp, "+q.a.formatExp(this.workStrExpGained)+" str exp, "+q.a.formatExp(this.workDefExpGained)+" def exp, "+q.a.formatExp(this.workDexExpGained)+" dex exp, "+q.a.formatExp(this.workAgiExpGained)+" agi exp, "+q.a.formatExp(this.workChaExpGained)+" cha exp."):Object($.a)(ee.a.createElement(ee.a.Fragment,null,"Crime successful!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma experience"))}else this.workHackExpGained/=2,this.workStrExpGained/=2,this.workDefExpGained/=2,this.workDexExpGained/=2,this.workAgiExpGained/=2,this.workChaExpGained/=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained "+q.a.formatExp(this.workHackExpGained)+" hack exp, "+q.a.formatExp(this.workStrExpGained)+" str exp, "+q.a.formatExp(this.workDefExpGained)+" def exp, "+q.a.formatExp(this.workDexExpGained)+" dex exp, "+q.a.formatExp(this.workAgiExpGained)+" agi exp, "+q.a.formatExp(this.workChaExpGained)+" cha exp."):Object($.a)(ee.a.createElement(ee.a.Fragment,null,"Crime failed!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma experience"));this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),E.Engine.loadLocationContent(!1)}function it(){if(!this.isWorking)return"";var e;switch(this.workType){case f.a.WorkTypeStudyClass:e=this.finishClass(!0);break;case f.a.WorkTypeCompany:e=this.finishWork(!0,!0);break;case f.a.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case f.a.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case f.a.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0);break;case f.a.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.error(`Unrecognized work type (${this.workType})`),""}return e}function ot(e){if("number"==typeof e)return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0);console.warn("Player.takeDamage() called without a numeric argument: "+e)}function st(e){"number"==typeof e?(this.hp+=e,this.hp>this.max_hp&&(this.hp=this.max_hp)):console.warn("Player.regenerateHp() called without a numeric argument: "+e)}function lt(){const e=Object(H.b)(this);return!1===j.a.SuppressHospitalizationPopup&&Object($.a)(ee.a.createElement(ee.a.Fragment,null,"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged ",ee.a.createElement(J.a,{money:e}))),this.loseMoney(e),this.recordMoneySource(-1*e,"hospitalization"),this.hp=this.max_hp,e}function ct(e,t=!1){let a=null;""!==this.companyName&&(a=u.a[this.companyName]);const n=this.jobs[this.companyName],r=u.a[this.location];if(!(r instanceof c.a))return t?"ERROR: Invalid company name: "+this.location+". applyToCompany() failed":void console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);let i=e;if(!this.isQualified(r,i)){var o=Object(h.a)(r,i);return!t&&void Object($.a)("Unforunately, you do not qualify for this position
"+o)}for(;;){let e=Object(m.a)(i);if(null==e)break;if(!r.hasPosition(e))break;if(!this.isQualified(r,e))break;i=e}if(null==a||a.name!=r.name||i.name!=n){if(this.jobs[r.name]=i.name,this.companyName=this.location,t)return!0;Object($.a)("Congratulations! You were offered a new job at "+this.companyName+" as a "+i.name+"!")}else{var s=Object(m.a)(i);if(null==s){if(t)return!1;Object($.a)("You are already at the highest position for your field! No promotion available")}else if(r.hasPosition(s)){if(t)return!1;o=Object(h.a)(r,s);Object($.a)("Unfortunately, you do not qualify for a promotion
"+o)}else{if(t)return!1;Object($.a)("You are already at the highest position for your field! No promotion available")}}}function ut(e,t){var a=null;if(""!==this.companyName&&(a=u.a[this.companyName]),null==a||a.name!=e.name)return t;const n=this.jobs[this.companyName],r=p.a[n];return r.isSoftwareJob()&&t.isSoftwareJob()||r.isITJob()&&t.isITJob()||r.isBusinessJob()&&t.isBusinessJob()||r.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||r.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||r.isSecurityJob()&&t.isSecurityJob()||r.isAgentJob()&&t.isAgentJob()||r.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||r.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||r.isPartTimeJob()&&t.isPartTimeJob()?Object(m.a)(r):t}function mt(e){this.isWorking=!1,this.companyName="",delete this.jobs[e]}function ht(e=!1){return this.applyForJob(p.a[d.j[0]],e)}function pt(e=!1){return this.applyForJob(p.a[d.k[0]],e)}function dt(e=!1){return this.applyForJob(p.a[d.d[0]],e)}function ft(e=!1){var t=u.a[this.location];return this.isQualified(t,p.a[d.i[0]])?this.applyForJob(p.a[d.i[0]],e):!e&&void Object($.a)("Unforunately, you do not qualify for this position")}function gt(e=!1){var t=u.a[this.location];return this.isQualified(t,p.a[d.f[0]])?this.applyForJob(p.a[d.f[0]],e):!e&&void Object($.a)("Unforunately, you do not qualify for this position")}function yt(e=!1){return this.applyForJob(p.a[d.b[0]],e)}function bt(e=!1){return this.applyForJob(p.a[d.c[0]],e)}function Et(e=!1){return this.applyForJob(p.a[d.h[2]],e)}function vt(e=!1){var t=u.a[this.location];return this.isQualified(t,p.a[d.a[0]])?this.applyForJob(p.a[d.a[0]],e):!e&&void Object($.a)("Unforunately, you do not qualify for this position")}function kt(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.e[1]])){if(this.companyName=t.name,this.jobs[t.name]=d.e[1],e)return!0;Object($.a)("Congratulations, you are now employed at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function _t(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.g[1]])){if(this.jobs[t.name]=d.g[1],e)return!0;Object($.a)("Congratulations, you are now employed part-time at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function Ct(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.e[0]])){if(this.companyName=t.name,this.jobs[t.name]=d.e[0],e)return!0;Object($.a)("Congratulations, you are now employed as a waiter at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function wt(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.g[0]])){if(this.companyName=t.name,this.jobs[t.name]=d.g[0],e)return!0;Object($.a)("Congratulations, you are now employed as a part-time waiter at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function St(e,t){var a=e.jobStatReqOffset,n=t.requiredHacking>0?t.requiredHacking+a:0,r=t.requiredStrength>0?t.requiredStrength+a:0,i=t.requiredDefense>0?t.requiredDefense+a:0,o=t.requiredDexterity>0?t.requiredDexterity+a:0,s=t.requiredDexterity>0?t.requiredDexterity+a:0,l=t.requiredCharisma>0?t.requiredCharisma+a:0;return this.hacking_skill>=n&&this.strength>=r&&this.defense>=i&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation}function xt(e=!0){e&&this.resetMultipliers();for(let e=0;et}var i=k.a.Illuminati;!i.isBanned&&!i.isMember&&!i.alreadyInvited&&t>=30&&this.money.gte(15e10)&&this.hacking_skill>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&e.push(i);var o=k.a.Daedalus;!o.isBanned&&!o.isMember&&!o.alreadyInvited&&t>=Math.round(30*s.a.DaedalusAugsRequirement)&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(o);var l=k.a["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=20&&this.money.gte(75e9)&&this.hacking_skill>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&e.push(l);var c=k.a.ECorp;c.isBanned||c.isMember||c.alreadyInvited||!r(T.a.AevumECorp)||e.push(c);var m=k.a.MegaCorp;m.isBanned||m.isMember||m.alreadyInvited||!r(T.a.Sector12MegaCorp)||e.push(m);var h=k.a["Bachman & Associates"];h.isBanned||h.isMember||h.alreadyInvited||!r(T.a.AevumBachmanAndAssociates)||e.push(h);var p=k.a["Blade Industries"];p.isBanned||p.isMember||p.alreadyInvited||!r(T.a.Sector12BladeIndustries)||e.push(p);var d=k.a.NWO;d.isBanned||d.isMember||d.alreadyInvited||!r(T.a.VolhavenNWO)||e.push(d);var g=k.a["Clarke Incorporated"];g.isBanned||g.isMember||g.alreadyInvited||!r(T.a.AevumClarkeIncorporated)||e.push(g);var y=k.a["OmniTek Incorporated"];y.isBanned||y.isMember||y.alreadyInvited||!r(T.a.VolhavenOmniTekIncorporated)||e.push(y);var b=k.a["Four Sigma"];b.isBanned||b.isMember||b.alreadyInvited||!r(T.a.Sector12FourSigma)||e.push(b);var E=k.a["KuaiGong International"];E.isBanned||E.isMember||E.alreadyInvited||!r(T.a.ChongqingKuaiGongInternational)||e.push(E);var v=k.a["Fulcrum Secret Technologies"],_=N.b[F.a[F.b.FulcrumSecretTechnologies]];null==_?console.error("Could not find Fulcrum Secret Technologies Server"):v.isBanned||v.isMember||v.alreadyInvited||!_.backdoorInstalled||!r(T.a.AevumFulcrumTechnologies,25e4)||e.push(v);var C=k.a.BitRunners,S=N.b[F.a[F.b.BitRunnersServer]];null==S?console.error("Could not find BitRunners Server"):C.isBanned||C.isMember||!S.backdoorInstalled||C.alreadyInvited||e.push(C);var x=k.a["The Black Hand"],M=N.b[F.a[F.b.TheBlackHandServer]];null==M?console.error("Could not find The Black Hand Server"):x.isBanned||x.isMember||!M.backdoorInstalled||x.alreadyInvited||e.push(x);var P=k.a.NiteSec,A=N.b[F.a[F.b.NiteSecServer]];null==A?console.error("Could not find NiteSec Server"):P.isBanned||P.isMember||!A.backdoorInstalled||P.alreadyInvited||e.push(P);var R=k.a.Chongqing;R.isBanned||R.isMember||R.alreadyInvited||!this.money.gte(2e7)||this.city!=O.a.Chongqing||e.push(R);var I=k.a["Sector-12"];I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(15e6)||this.city!=O.a.Sector12||e.push(I);var j=k.a["New Tokyo"];j.isBanned||j.isMember||j.alreadyInvited||!this.money.gte(2e7)||this.city!=O.a.NewTokyo||e.push(j);var D=k.a.Aevum;D.isBanned||D.isMember||D.alreadyInvited||!this.money.gte(4e7)||this.city!=O.a.Aevum||e.push(D);var B=k.a.Ishima;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(3e7)||this.city!=O.a.Ishima||e.push(B);var L=k.a.Volhaven;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(5e7)||this.city!=O.a.Volhaven||e.push(L);var G=k.a["Speakers for the Dead"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&!a.includes(T.a.Sector12CIA)&&!a.includes(T.a.Sector12NSA)&&e.push(G);var W=k.a["The Dark Army"];!W.isBanned&&!W.isMember&&!W.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==O.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!a.includes(T.a.Sector12CIA)&&!a.includes(T.a.Sector12NSA)&&e.push(W);var H=k.a["The Syndicate"];!H.isBanned&&!H.isMember&&!H.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==O.a.Aevum||this.city==O.a.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&!a.includes(T.a.Sector12CIA)&&!a.includes(T.a.Sector12NSA)&&e.push(H);var U=k.a.Silhouette;!U.isBanned&&!U.isMember&&!U.alreadyInvited&&(n.includes("Chief Technology Officer")||n.includes("Chief Financial Officer")||n.includes("Chief Executive Officer"))&&this.money.gte(15e6)&&this.karma<=-22&&e.push(U);var q=k.a.Tetrads;!q.isBanned&&!q.isMember&&!q.alreadyInvited&&(this.city==O.a.Chongqing||this.city==O.a.NewTokyo||this.city==O.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(q);var K=k.a["Slum Snakes"];!K.isBanned&&!K.isMember&&!K.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(K);var $=k.a.Netburners,z=0,Y=0,V=0;for(let e=0;e=80&&z>=8&&Y>=4&&V>=100&&e.push($);var J=k.a["Tian Di Hui"];J.isBanned||J.isMember||J.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=O.a.Chongqing&&this.city!=O.a.NewTokyo&&this.city!=O.a.Ishima||e.push(J);var Q=k.a.CyberSec,X=N.b[F.a[F.b.CyberSecServer]];return null==X?console.error("Could not find CyberSec Server"):Q.isBanned||Q.isMember||!X.backdoorInstalled||Q.alreadyInvited||e.push(Q),e}function Mt(e){this.bitNodeN=e}function Pt(e){for(const t in this.queuedAugmentations)if(this.queuedAugmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);for(const t in this.augmentations)if(this.augmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);this.firstAugPurchased=!0,this.queuedAugmentations.push(new i.a(e))}function At(e,t=1){if(null==e||null==e.type||null==e)return"No reward for this contract";switch(e.type){case l.c.FactionReputation:if(null==e.name||!(k.a[e.name]instanceof v.a))return e.type=l.c.FactionReputationAll,this.gainCodingContractReward(e);var a=f.a.CodingContractBaseFactionRepGain*t;return k.a[e.name].playerReputation+=a,`Gained ${a} faction reputation for ${e.name}`;case l.c.FactionReputationAll:const i=f.a.CodingContractBaseFactionRepGain*t,o=["Bladeburners"];var n=this.factions.slice();if(0==(n=n.filter(e=>!o.includes(e))).length)return e.type=l.c.Money,this.gainCodingContractReward(e,t);const m=Math.floor(i/n.length);for(const e of n)k.a[e]instanceof v.a&&(k.a[e].playerReputation+=m);return`Gained ${m} reputation for each of the following factions: ${n.toString()}`;case l.c.CompanyReputation:if(null==e.name||!(u.a[e.name]instanceof c.a))return e.type=l.c.FactionReputationAll,this.gainCodingContractReward(e);a=f.a.CodingContractBaseCompanyRepGain*t;return u.a[e.name].playerReputation+=a,`Gained ${a} company reputation for ${e.name}`;case l.c.Money:default:var r=f.a.CodingContractBaseMoneyGain*t*s.a.CodingContractMoney;return this.gainMoney(r),this.recordMoneySource(r,"codingcontract"),"Gained "+q.a.formatMoney(r)}}function Rt(e){return null==S.a[e]?(console.warn("Player.travel() called with invalid city: "+e),!1):(this.city=e,!0)}function Nt(e){return null==x.a[e]?(console.warn("Player.gotoLocation() called with invalid location: "+e),!1):(this.location=e,!0)}function It(){return 10===this.bitNodeN||G.a[10]>0}function jt(e){this.exploits.includes(e)||this.exploits.push(e)}function Ft(e){return Object(A.a)(this.intelligence,e)}function Dt(){return this.moneySourceA.casino}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(21),r=a(7),i=a(40);const o=[{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:8.18},name:r.a.AevumAeroCorp,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:8.19},name:r.a.AevumBachmanAndAssociates,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:9.55},name:r.a.AevumClarkeIncorporated,types:[i.a.Company]},{city:n.a.Aevum,costMult:3,expMult:2,name:r.a.AevumCrushFitnessGym,types:[i.a.Gym]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:37,startingSecurityLevel:17.02},name:r.a.AevumECorp,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:128},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:15.54},name:r.a.AevumFulcrumTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:256},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:7.89},name:r.a.AevumGalacticCybersystems,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:3.29},name:r.a.AevumNetLinkTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:64,techVendorMinRam:8},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:5.35},name:r.a.AevumPolice,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:5.02},name:r.a.AevumRhoConstruction,types:[i.a.Company]},{city:n.a.Aevum,costMult:10,expMult:5,name:r.a.AevumSnapFitnessGym,types:[i.a.Gym]},{city:n.a.Aevum,costMult:4,expMult:3,name:r.a.AevumSummitUniversity,types:[i.a.University]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:7,startingSecurityLevel:5.85},name:r.a.AevumWatchdogSecurity,types:[i.a.Company]},{city:n.a.Aevum,name:r.a.AevumCasino,types:[i.a.Casino]},{city:n.a.Chongqing,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:16.25},name:r.a.ChongqingKuaiGongInternational,types:[i.a.Company]},{city:n.a.Chongqing,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:12.59},name:r.a.ChongqingSolarisSpaceSystems,types:[i.a.Company]},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.02},name:r.a.IshimaNovaMedical,types:[i.a.Company]},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.2},name:r.a.IshimaOmegaSoftware,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:128,techVendorMinRam:4},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.38},name:r.a.IshimaStormTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:32},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:7.18},name:r.a.NewTokyoDefComm,types:[i.a.Company]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:20,startingSecurityLevel:5.9},name:r.a.NewTokyoGlobalPharmaceuticals,types:[i.a.Company]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:2.5},name:r.a.NewTokyoNoodleBar,types:[i.a.Company,i.a.Special]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.52},name:r.a.NewTokyoVitaLife,types:[i.a.Company,i.a.Special]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.62},name:r.a.Sector12AlphaEnterprises,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:8,techVendorMinRam:2},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:10.59},name:r.a.Sector12BladeIndustries,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12CIA,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.66},name:r.a.Sector12CarmichaelSecurity,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12CityHall,types:[i.a.Special]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12DeltaOne,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12FoodNStuff,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:8.18},name:r.a.Sector12FourSigma,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:6.02},name:r.a.Sector12IcarusMicrosystems,types:[i.a.Company]},{city:n.a.Sector12,expMult:1,costMult:1,name:r.a.Sector12IronGym,types:[i.a.Gym]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:3.13},name:r.a.Sector12JoesGuns,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:31,startingSecurityLevel:16.36},name:r.a.Sector12MegaCorp,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12NSA,types:[i.a.Company,i.a.Special]},{city:n.a.Sector12,costMult:20,expMult:10,name:r.a.Sector12PowerhouseGym,types:[i.a.Gym]},{city:n.a.Sector12,costMult:3,expMult:2,name:r.a.Sector12RothmanUniversity,types:[i.a.University]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12UniversalEnergy,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:3.59},name:r.a.VolhavenCompuTek,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:256,techVendorMinRam:8},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:7.28},name:r.a.VolhavenHeliosLabs,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.35},name:r.a.VolhavenLexoCorp,types:[i.a.Company]},{city:n.a.Volhaven,costMult:7,expMult:4,name:r.a.VolhavenMilleniumFitnessGym,types:[i.a.Gym]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:50,startingSecurityLevel:8.53},name:r.a.VolhavenNWO,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:7.74},name:r.a.VolhavenOmniTekIncorporated,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:128},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:22,startingSecurityLevel:6},name:r.a.VolhavenOmniaCybersystems,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:4.77},name:r.a.VolhavenSysCoreSecurities,types:[i.a.Company]},{city:n.a.Volhaven,costMult:5,expMult:4,name:r.a.VolhavenZBInstituteOfTechnology,types:[i.a.University]},{city:null,name:r.a.Hospital,types:[i.a.Hospital]},{city:null,name:r.a.Slums,types:[i.a.Slums]},{city:null,name:r.a.TravelAgency,types:[i.a.TravelAgency]},{city:null,name:r.a.WorldStockExchange,types:[i.a.StockMarket]}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(263),r=a(1);function i(e){const t="SourceFile"+e.n,a=n.a[t];if(null!=a){switch(e.n){case 1:{let t=0;for(let a=0;a0?"and Source Files ":""} that have been installed. You have gained the effects of these.`),n.createElement(r.a,null),n.createElement("br",null)," ",n.createElement("br",null),n.createElement(i.a,null)))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(720),i=a(721),o=a(722),s=a(724),l=a(33),c=a(136);class u extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.collapseAllHeaders=this.collapseAllHeaders.bind(this),this.expandAllHeaders=this.expandAllHeaders.bind(this),this.sortByAcquirementTime=this.sortByAcquirementTime.bind(this),this.sortInOrder=this.sortInOrder.bind(this),this.listRef=n.createRef()}collapseAllHeaders(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e({rerenderFlag:!e.rerenderFlag}))}sortByAcquirementTime(){l.a.OwnedAugmentationsOrder=c.a.AcquirementTime,this.rerender()}sortInOrder(){l.a.OwnedAugmentationsOrder=c.a.Alphabetically,this.rerender()}render(){return n.createElement(n.Fragment,null,n.createElement(i.a,{collapseAllButtonsFn:this.collapseAllHeaders,expandAllButtonsFn:this.expandAllHeaders,sortByAcquirementTimeFn:this.sortByAcquirementTime,sortInOrderFn:this.sortInOrder}),n.createElement("ul",{className:"augmentations-list",ref:this.listRef},n.createElement(s.a,null),n.createElement(o.a,null),n.createElement(r.a,null)))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(1),i=a(18),o=a(4),s=a(33),l=a(136),c=a(426);function u(){const e=r.a.augmentations.slice();s.a.OwnedAugmentationsOrder===l.a.Alphabetically&&e.sort((e,t)=>e.name<=t.name?-1:1);const t=e.map(e=>{const t=i.a[e.name];let a=null;return e.name===o.a.NeuroFluxGovernor&&(a=e.level),n.createElement("li",{key:e.name},n.createElement(c.a,{aug:t,level:a}))});return n.createElement(n.Fragment,null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(22);function i(e){return n.createElement(n.Fragment,null,n.createElement(r.a,{onClick:e.expandAllButtonsFn,text:"Expand All"}),n.createElement(r.a,{onClick:e.collapseAllButtonsFn,text:"Collapse All"}),n.createElement(r.a,{onClick:e.sortInOrderFn,text:"Sort in Order",tooltip:"Sorts the Augmentations alphabetically and Source-Files in numeral order"}),n.createElement(r.a,{onClick:e.sortByAcquirementTimeFn,text:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source-Files based on when you acquired them (same as default)"}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(1),i=a(33),o=a(136),s=a(263),l=a(723);function c(){const e=r.a.sourceFiles.slice();i.a.OwnedAugmentationsOrder===o.a.Alphabetically&&e.sort((e,t)=>e.n-t.n);const t=e.map(e=>{const t="SourceFile"+e.n,a=s.a[t];return null==a?(console.error("Invalid source file number: "+e.n),null):n.createElement("li",{key:e.n},n.createElement(l.a,{level:e.lvl,sf:a}))});return n.createElement(n.Fragment,null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(163);function i(e){const t=12===e.sf.n?"∞":"3";return n.createElement(r.a,{headerContent:n.createElement(n.Fragment,null,e.sf.name,n.createElement("br",null),`Level ${e.level} / ${t}`),panelContent:n.createElement("p",{dangerouslySetInnerHTML:{__html:e.sf.info}})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(1),i=a(216),o=a(163);function s(){const e=r.a.exploits;return 0===e.length?n.createElement(n.Fragment,null):n.createElement("li",{key:-1},n.createElement(o.a,{headerContent:n.createElement(n.Fragment,null,"Source-File -1: Exploits in the BitNodes",n.createElement("br",null),"Level ",e.length," / ?"),panelContent:n.createElement(n.Fragment,null,n.createElement("p",null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),n.createElement("p",null,"It increases all of the player's multipliers by 0.1%"),n.createElement("br",null),n.createElement("p",null,"You have found the following exploits:"),n.createElement("ul",null,e.map(e=>n.createElement("li",{key:e},"* ",Object(i.b)(e)))))}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(1),i=a(2),o=a(18);function s(){const e=function(){const e={};for(const t of r.a.queuedAugmentations){const a=o.a[t.name];for(const t in a.mults){const n=e[t]?e[t]:1;e[t]=n*a.mults[t]}}return e}();function t(e){return n.createElement("table",null,n.createElement("tbody",null,e.map(e=>n.createElement("tr",{key:e[0]},n.createElement("td",{key:"0"},n.createElement("span",null,e[0]," multiplier: ")),n.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatPercentage(e[1])),function(e){let t=[];return e&&(t=[n.createElement("td",{key:"2"}," ","=>"," "),n.createElement("td",{key:"3"},i.a.formatPercentage(e))]),t}(e[2])))))}return n.createElement(n.Fragment,null,n.createElement("p",null,n.createElement("strong",null,n.createElement("u",null,"Multipliers:"))),n.createElement("br",null),t([["Hacking Chance ",r.a.hacking_chance_mult,r.a.hacking_chance_mult*e.hacking_chance_mult],["Hacking Speed ",r.a.hacking_speed_mult,r.a.hacking_speed_mult*e.hacking_speed_mult],["Hacking Money ",r.a.hacking_money_mult,r.a.hacking_money_mult*e.hacking_money_mult],["Hacking Growth ",r.a.hacking_grow_mult,r.a.hacking_grow_mult*e.hacking_grow_mult]]),n.createElement("br",null),t([["Hacking Level ",r.a.hacking_mult,r.a.hacking_mult*e.hacking_mult],["Hacking Experience ",r.a.hacking_exp_mult,r.a.hacking_exp_mult*e.hacking_exp_mult]]),n.createElement("br",null),t([["Strength Level ",r.a.strength_mult,r.a.strength_mult*e.strength_mult],["Strength Experience ",r.a.strength_exp_mult,r.a.strength_exp_mult*e.strength_exp_mult]]),n.createElement("br",null),t([["Defense Level ",r.a.defense_mult,r.a.defense_mult*e.defense_mult],["Defense Experience ",r.a.defense_exp_mult,r.a.defense_exp_mult*e.defense_exp_mult]]),n.createElement("br",null),t([["Dexterity Level ",r.a.dexterity_mult,r.a.dexterity_mult*e.dexterity_mult],["Dexterity Experience ",r.a.dexterity_exp_mult,r.a.dexterity_exp_mult*e.dexterity_exp_mult]]),n.createElement("br",null),t([["Agility Level ",r.a.agility_mult,r.a.agility_mult*e.agility_mult],["Agility Experience ",r.a.agility_exp_mult,r.a.agility_exp_mult*e.agility_exp_mult]]),n.createElement("br",null),t([["Charisma Level ",r.a.charisma_mult,r.a.charisma_mult*e.charisma_mult],["Charisma Experience ",r.a.charisma_exp_mult,r.a.charisma_exp_mult*e.charisma_exp_mult]]),n.createElement("br",null),t([["Hacknet Node production ",r.a.hacknet_node_money_mult,r.a.hacknet_node_money_mult*e.hacknet_node_money_mult],["Hacknet Node purchase cost ",r.a.hacknet_node_purchase_cost_mult,r.a.hacknet_node_purchase_cost_mult*e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost ",r.a.hacknet_node_ram_cost_mult,r.a.hacknet_node_ram_cost_mult*e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost ",r.a.hacknet_node_core_cost_mult,r.a.hacknet_node_core_cost_mult*e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost ",r.a.hacknet_node_level_cost_mult,r.a.hacknet_node_level_cost_mult*e.hacknet_node_level_cost_mult]]),n.createElement("br",null),t([["Company reputation gain ",r.a.company_rep_mult,r.a.company_rep_mult*e.company_rep_mult],["Faction reputation gain ",r.a.faction_rep_mult,r.a.faction_rep_mult*e.faction_rep_mult],["Salary ",r.a.work_money_mult,r.a.work_money_mult*e.work_money_mult]]),n.createElement("br",null),t([["Crime success ",r.a.crime_success_mult,r.a.crime_success_mult*e.crime_success_mult],["Crime money ",r.a.crime_money_mult,r.a.crime_money_mult*e.crime_money_mult]]),n.createElement("br",null),n.createElement((function(){return r.a.canAccessBladeburner()?n.createElement(n.Fragment,null,t([["Bladeburner Success Chance",r.a.bladeburner_success_chance_mult,r.a.bladeburner_success_chance_mult*e.bladeburner_success_chance_mult],["Bladeburner Max Stamina",r.a.bladeburner_max_stamina_mult,r.a.bladeburner_max_stamina_mult*e.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",r.a.bladeburner_stamina_gain_mult,r.a.bladeburner_stamina_gain_mult*e.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",r.a.bladeburner_analysis_mult,r.a.bladeburner_analysis_mult*e.bladeburner_analysis_mult]]),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(18),i=a(4),o=a(1),s=a(426);function l(){const e=[];let t=-1;for(let e=o.a.queuedAugmentations.length-1;e>=0;e--)if(o.a.queuedAugmentations[e].name===i.a.NeuroFluxGovernor){t=e;break}for(let a=0;ae.startFocusing()},"Focus"))))}const w=Object(i.a)({cellNone:{borderBottom:"none",padding:0,margin:0},cell:{padding:0,margin:0},hp:{color:v.b.hp},money:{color:v.b.money},hack:{color:v.b.hack},combat:{color:v.b.combat},cha:{color:v.b.cha},int:{color:v.b.int},nobackground:{backgroundColor:"#0000"}});function S({player:e,save:t}){const a=Object(n.useState)(!1)[1],[i,s]=Object(n.useState)(!0);Object(n.useEffect)(()=>{const e=setInterval(()=>a(e=>!e),600);return()=>clearInterval(e)},[]);const b=w();return r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{display:"flex",justifyContent:"flex-end",flexDirection:"column"},r.a.createElement(g.a,{in:i},r.a.createElement(h.a,{square:!0},r.a.createElement(p.a,{m:1},r.a.createElement(l.a,{size:"small"},r.a.createElement(c.a,null,r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.hp}},"HP ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.hp}},o.a.formatHp(e.hp)," / ",o.a.formatHp(e.max_hp)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.money}},"Money ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.money}},o.a.formatMoney(e.money.toNumber())))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cell}},r.a.createElement(d.a,{classes:{root:b.hack}},"Hack ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cell}},r.a.createElement(d.a,{classes:{root:b.hack}},o.a.formatSkill(e.hacking_skill)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},"Str ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},o.a.formatSkill(e.strength)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},"Def ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},o.a.formatSkill(e.defense)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},"Dex ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},o.a.formatSkill(e.dexterity)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cell}},r.a.createElement(d.a,{classes:{root:b.combat}},"Agi ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cell}},r.a.createElement(d.a,{classes:{root:b.combat}},o.a.formatSkill(e.agility)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.cha}},"Cha ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.cha}},o.a.formatSkill(e.charisma)))),r.a.createElement(_,{player:e}),r.a.createElement(C,{player:e}),r.a.createElement(m.a,null,r.a.createElement(u.a,{align:"center",colSpan:2,classes:{root:b.cellNone}},r.a.createElement(f.a,{color:0!==k.a.AutosaveInterval?"primary":"secondary",onClick:t},"SAVE")))))))),r.a.createElement(p.a,{display:"flex",justifyContent:"flex-end"},r.a.createElement(y.a,{classes:{root:b.nobackground},color:"secondary",onClick:()=>s(e=>!e)},r.a.createElement(E.a,null)))))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(147),r=a(0),i=a.n(r),o=a(130),s=a(769),l=a(771),c=a(808),u=a(809),m=a(810),h=a(811),p=a(812),d=a(813),f=a(814),g=a(815),y=a(816),b=a(817),E=a(818),v=a(819),k=a(820);function _(e){return i.a.createElement(o.a,null,i.a.createElement(i.a.Fragment,null,i.a.createElement("h1",null,"Development Menu - Only meant to be used for testing/debugging"),i.a.createElement(s.a,{player:e.player}),i.a.createElement(l.a,{player:e.player}),i.a.createElement(c.a,{player:e.player}),i.a.createElement(u.a,{player:e.player}),i.a.createElement(m.a,{player:e.player}),i.a.createElement(h.a,{player:e.player}),i.a.createElement(p.a,null),i.a.createElement(d.a,null),e.player.bladeburner instanceof n.a&&i.a.createElement(f.a,{player:e.player}),e.player.inGang()&&i.a.createElement(g.a,{player:e.player}),e.player.hasCorporation()&&i.a.createElement(y.a,{player:e.player}),i.a.createElement(b.a,null),e.player.hasWseAccount&&i.a.createElement(E.a,null),e.player.sleeves.length>0&&i.a.createElement(v.a,{player:e.player}),i.a.createElement(k.a,{player:e.player,engine:e.engine})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(11),h=a(122);function p(e){function t(t){return function(){e.player.gainMoney(t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"General")),r.a.createElement(s.a,null,r.a.createElement("div",null,r.a.createElement(u.a,{onClick:t(1e6)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e6}))),r.a.createElement(u.a,{onClick:t(1e9)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e9}))),r.a.createElement(u.a,{onClick:t(1e12)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e12}))),r.a.createElement(u.a,{onClick:t(1e15)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e15}))),r.a.createElement(u.a,{onClick:t(1/0)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1/0}))),r.a.createElement(u.a,{onClick:function(){e.player.getHomeComputer().maxRam*=2}},"+ RAM")),r.a.createElement("div",null,r.a.createElement(u.a,{onClick:function(){Object(h.a)(e.player.bitNodeN,!0,!0)}},"Quick b1t_flum3.exe"),r.a.createElement(u.a,{onClick:function(){Object(h.a)(e.player.bitNodeN,!0)}},"Run b1t_flum3.exe"),r.a.createElement(u.a,{onClick:function(){Object(h.a)(e.player.bitNodeN,!1,!0)}},"Quick w0rld_d34m0n"),r.a.createElement(u.a,{onClick:function(){Object(h.a)(e.player.bitNodeN)}},"Hack w0rld_d34m0n"))))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(107);const h=1e27;function p(e){function t(t,a){return function(n){switch(t){case"hacking":n&&e.player.gainHackingExp(n*a);break;case"strength":n&&e.player.gainStrengthExp(n*a);break;case"defense":n&&e.player.gainDefenseExp(n*a);break;case"dexterity":n&&e.player.gainDexterityExp(n*a);break;case"agility":n&&e.player.gainAgilityExp(n*a);break;case"charisma":n&&e.player.gainCharismaExp(n*a);break;case"intelligence":n&&e.player.gainIntelligenceExp(n*a)}e.player.updateSkillLevels()}}function a(t){return function(a){e.player.karma+=a*t}}function n(t){return function(){switch(t){case"hacking":e.player.hacking_exp=0;break;case"strength":e.player.strength_exp=0;break;case"defense":e.player.defense_exp=0;break;case"dexterity":e.player.dexterity_exp=0;break;case"agility":e.player.agility_exp=0;break;case"charisma":e.player.charisma_exp=0;break;case"intelligence":e.player.intelligence_exp=0}e.player.updateSkillLevels()}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Experience / Stats")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"All:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.gainHackingExp(h),e.player.gainStrengthExp(h),e.player.gainDefenseExp(h),e.player.gainDexterityExp(h),e.player.gainAgilityExp(h),e.player.gainCharismaExp(h),e.player.gainIntelligenceExp(h),e.player.updateSkillLevels()}},"Tons of exp"),r.a.createElement(u.a,{onClick:function(){e.player.hacking_exp=0,e.player.strength_exp=0,e.player.defense_exp=0,e.player.dexterity_exp=0,e.player.agility_exp=0,e.player.charisma_exp=0,e.player.intelligence_exp=0,e.player.updateSkillLevels()}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Hacking:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"hacking",placeholder:"exp",tons:()=>t("hacking",1)(h),add:t("hacking",1),subtract:t("hacking",-1),reset:n("hacking")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Strength:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"strength",placeholder:"exp",tons:()=>t("strength",1)(h),add:t("strength",1),subtract:t("strength",-1),reset:n("strength")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Defense:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"defense",placeholder:"exp",tons:()=>t("defense",1)(h),add:t("defense",1),subtract:t("defense",-1),reset:n("defense")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Dexterity:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"dexterity",placeholder:"exp",tons:()=>t("dexterity",1)(h),add:t("dexterity",1),subtract:t("dexterity",-1),reset:n("dexterity")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Agility:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"agility",placeholder:"exp",tons:()=>t("agility",1)(h),add:t("agility",1),subtract:t("agility",-1),reset:n("agility")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Charisma:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"charisma",placeholder:"exp",tons:()=>t("charisma",1)(h),add:t("charisma",1),subtract:t("charisma",-1),reset:n("charisma")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Intelligence:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"intelligence",placeholder:"exp",tons:()=>t("intelligence",1)(h),add:t("intelligence",1),subtract:t("intelligence",-1),reset:n("intelligence")})),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){0===e.player.intelligence&&(e.player.intelligence=1,e.player.updateSkillLevels())}},"Enable")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.intelligence_exp=0,e.player.intelligence=0,e.player.updateSkillLevels()}},"Disable"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Karma:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"karma",placeholder:"amt",tons:()=>t("intelligence",1)(1e5),add:a(1),subtract:a(-1),reset:function(){e.player.karma=0}})))))))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(107),p=a(24),d=a(1030),f=a(116),g=a(255),y=a(438),b=a.n(y),E=a(439),v=a.n(E),k=a(1031);function _(e){const[t,a]=Object(n.useState)("Illuminati");function l(e){return function(a){const n=p.a[t];null==n||isNaN(a)||(n.playerReputation+=a*e)}}function y(e){return function(a){const n=p.a[t];null==n||isNaN(a)||(n.favor+=a*e)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Factions")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Faction:")),r.a.createElement("td",null,r.a.createElement(d.a,null,r.a.createElement(k.a,{id:"factions-select"},"Faction"),r.a.createElement(m.a,{labelId:"factions-select",id:"factions-dropdown",className:"dropdown exp-input",onChange:function(e){a(e.target.value)},value:t,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(g.a,{color:"primary",onClick:function(){for(const t in p.a)e.player.receiveInvite(p.a[t].name)},size:"large"},r.a.createElement(b.a,null)),r.a.createElement(g.a,{color:"primary",onClick:function(){e.player.receiveInvite(t)},size:"large"},r.a.createElement(v.a,null)))},Object.values(p.a).map(e=>r.a.createElement(f.a,{key:e.name,value:e.name},e.name)))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Reputation:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"reputation",placeholder:"amt",tons:()=>l(1)(1e12),add:l(1),subtract:l(-1),reset:function(){const e=p.a[t];null!=e&&(e.playerReputation=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Favor:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"favor",placeholder:"amt",tons:()=>y(1)(2e3),add:y(1),subtract:y(-1),reset:function(){const e=p.a[t];null!=e&&(e.favor=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"All Reputation:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in p.a)p.a[e].playerReputation=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const e in p.a)p.a[e].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"All Favor:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in p.a)p.a[e].favor=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const e in p.a)p.a[e].favor=0}},"Reset")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(287),m=a(4),h=a(116),p=a(255),d=a(438),f=a.n(d),g=a(439),y=a.n(g),b=a(437),E=a.n(b);function v(e){const[t,a]=Object(n.useState)("Augmented Targeting I");return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Augmentations")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Aug:")),r.a.createElement("td",null,r.a.createElement(u.a,{id:"dev-augs-dropdown",className:"dropdown",onChange:function(e){a(e.target.value)},value:t,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{color:"primary",onClick:function(){for(const t in m.a){const a=m.a[t];e.player.queueAugmentation(a)}},size:"large"},r.a.createElement(f.a,null)),r.a.createElement(p.a,{color:"primary",onClick:function(){e.player.queueAugmentation(t)},size:"large"},r.a.createElement(y.a,null))),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{color:"primary",onClick:function(){e.player.augmentations=[]},size:"large"},r.a.createElement(E.a,null)))},Object.values(m.a).map(e=>r.a.createElement(h.a,{key:e,value:e},e)))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(425),h=a(549);const p=[1,2,3,4,5,6,7,8,9,10,11,12];function d(e){function t(t,a){return function(){if(0!==a)if(e.player.sourceFiles.some(e=>e.n===t))for(let n=0;ne.n!==t)}}function a(e){return()=>{for(let a=0;ar.a.createElement("tr",{key:"sf-"+e},r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"SF-",e,":")),r.a.createElement("td",null,r.a.createElement(h.a,null,r.a.createElement(u.a,{onClick:t(e,0)},"0"),r.a.createElement(u.a,{onClick:t(e,1)},"1"),r.a.createElement(u.a,{onClick:t(e,2)},"2"),r.a.createElement(u.a,{onClick:t(e,3)},"3")))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(55),p=a(116);function d(e){const[t,a]=Object(n.useState)("NUKE.exe");return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Programs")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Program:")),r.a.createElement("td",null,r.a.createElement(m.a,{onChange:function(e){a(e.target.value)},value:t},Object.values(h.a).map(e=>r.a.createElement(p.a,{key:e.name,value:e.name},e.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Add:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.hasProgram(t)||e.player.getHomeComputer().programs.push(t)}},"One"),r.a.createElement(u.a,{onClick:function(){for(const t in h.a)e.player.hasProgram(h.a[t].name)||e.player.getHomeComputer().programs.push(h.a[t].name)}},"All")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(27),p=a(85),d=a(35),f=a(116);function g(){const[e,t]=Object(n.useState)("home");return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Servers")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Server:")),r.a.createElement("td",{colSpan:2},r.a.createElement(m.a,{id:"dev-servers-dropdown",className:"dropdown",onChange:function(e){t(e.target.value)},value:e},Object.values(h.b).map(e=>r.a.createElement(f.a,{key:e.hostname,value:e.hostname},e.hostname))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Root:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const t=Object(d.a)(e);null!==t&&(t instanceof p.a||(t.hasAdminRights=!0,t.sshPortOpen=!0,t.ftpPortOpen=!0,t.smtpPortOpen=!0,t.httpPortOpen=!0,t.sqlPortOpen=!0,t.openPortCount=5))}},"Root one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.b){const t=h.b[e];if(t instanceof p.a)return;t.hasAdminRights=!0,t.sshPortOpen=!0,t.ftpPortOpen=!0,t.smtpPortOpen=!0,t.httpPortOpen=!0,t.sqlPortOpen=!0,t.openPortCount=5}}},"Root all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Security:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const t=Object(d.a)(e);null!==t&&(t instanceof p.a||(t.hackDifficulty=t.minDifficulty))}},"Min one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.b){const t=h.b[e];t instanceof p.a||(t.hackDifficulty=t.minDifficulty)}}},"Min all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Money:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const t=Object(d.a)(e);null!==t&&(t instanceof p.a||(t.moneyAvailable=t.moneyMax))}},"Max one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.b){const t=h.b[e];t instanceof p.a||(t.moneyAvailable=t.moneyMax)}}},"Max all")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(47),p=a(116),d=a(107);function f(){const[e,t]=Object(n.useState)("ECorp");function a(t){return function(a){const n=h.a[e];null==n||isNaN(a)||(n.playerReputation+=a*t)}}function l(t){return function(a){const n=h.a[e];null==n||isNaN(a)||(n.favor+=a*t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Companies")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Company:")),r.a.createElement("td",{colSpan:3},r.a.createElement(m.a,{id:"dev-companies-dropdown",className:"dropdown",onChange:function(e){t(e.target.value)},value:e},Object.values(h.a).map(e=>r.a.createElement(p.a,{key:e.name,value:e.name},e.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Reputation:")),r.a.createElement("td",null,r.a.createElement(d.a,{label:"reputation",placeholder:"amt",tons:()=>a(1)(1e12),add:a(1),subtract:a(-1),reset:function(){h.a[e].playerReputation=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Favor:")),r.a.createElement("td",null,r.a.createElement(d.a,{label:"favor",placeholder:"amt",tons:()=>l(1)(2e3),add:l(1),subtract:l(-1),reset:function(){h.a[e].favor=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"All Reputation:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.a)h.a[e].playerReputation=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const e in h.a)h.a[e].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"All Favor:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.a)h.a[e].favor=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const e in h.a)h.a[e].favor=0}},"Reset")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(107);function m(e){function t(t){return function(a){e.player.bladeburner&&e.player.bladeburner.changeRank(e.player,a*t)}}function a(t){return function(a){e.player.bladeburner&&(e.player.bladeburner.storedCycles+=a*t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Bladeburner")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Rank:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"rank",placeholder:"amt",tons:function(){e.player.bladeburner&&e.player.bladeburner.changeRank(e.player,1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.bladeburner.rank=0,e.player.bladeburner.maxRank=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Cycles:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.bladeburner&&(e.player.bladeburner.storedCycles+=1e27)},add:a(1),subtract:a(-1),reset:function(){e.player.bladeburner&&(e.player.bladeburner.storedCycles=0)}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(107);function m(e){function t(t){return function(a){e.player.gang&&(e.player.gang.storedCycles+=a*t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Gang")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Cycles:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.gang&&(e.player.gang.storedCycles=1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.gang&&(e.player.gang.storedCycles=0)}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(107);function h(e){function t(t){return function(a){e.player.corporation&&(e.player.corporation.storedCycles+=a*t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Corporation")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds.plus(1e99))}},"Tons of funds"),r.a.createElement(u.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds.minus(e.player.corporation.funds))}},"Reset funds"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Cycles:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.corporation&&(e.player.corporation.storedCycles=1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.corporation&&(e.player.corporation.storedCycles=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.corporation&&e.player.corporation.divisions.forEach(e=>{Object.keys(e.products).forEach(t=>{const a=e.products[t];if(void 0===a)throw new Error("Impossible product undefined");a.prog=99.9})})}},"Finish products"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.corporation&&e.player.corporation.divisions.forEach(e=>{e.sciResearch.qty+=1e10})}},"Tons of research")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(116),p=a(274),d=a(76);function f(){const[e,t]=Object(n.useState)("Find Largest Prime Factor");return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Coding Contracts")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:p.b},"Generate Random Contract"),r.a.createElement(u.a,{onClick:p.c},"Generate Random Contract on Home Comp"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onChange:function(e){t(e.target.value)},value:e},Object.values(d.d).map(e=>r.a.createElement(h.a,{key:e.name,value:e.name},e.name))),r.a.createElement(u.a,{onClick:function(){Object(p.a)({problemType:e,server:"home"})}},"Generate Specified Contract Type on Home Comp")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(395),h=a(11),p=a(9),d=a(71),f=a(100);function g(){const[e,t]=Object(n.useState)(0),[a,l]=Object(n.useState)("");function g(e){const t=a.replace(/\s/g,"");let n=()=>!0;""!==t&&"all"!==t&&(n=function(e){return t.split(",").includes(e)});for(const t in d.a)if(d.a.hasOwnProperty(t)){const a=d.a[t];a instanceof f.a&&n(a.symbol)&&e(a)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Stock Market")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Symbol:")),r.a.createElement("td",null,r.a.createElement(m.a,{placeholder:"symbol/'all'",onChange:function(e){l(e.target.value)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Price:")),r.a.createElement("td",null,r.a.createElement(m.a,{placeholder:"$$$",onChange:function(e){t(parseFloat(e.target.value))}}),r.a.createElement(u.a,{onClick:function(){isNaN(e)||g(t=>{t.price=e})}},"Set"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Caps:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=[];g(t=>{e.push(r.a.createElement("tr",{key:t.symbol},r.a.createElement("td",null,t.symbol),r.a.createElement("td",{style:{textAlign:"right"}},r.a.createElement(h.a,{money:t.cap}))))}),Object(p.a)(r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("th",null,"Stock"),r.a.createElement("th",null,"Price cap")),e)))}},"View stock caps")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48);function m(e){return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Sleeves")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Shock:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(let t=0;t{e.player.lastUpdate-=t,e.engine._lastUpdate-=t,m.b.saveGame(e.engine.indexedDb),setTimeout(()=>location.reload(),1e3)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Sleeves")),r.a.createElement(s.a,null,r.a.createElement(u.a,{onClick:t(6e4)},"1 minute"),r.a.createElement(u.a,{onClick:t(36e5)},"1 hour"),r.a.createElement(u.a,{onClick:t(864e5)},"1 day")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(24),o=a(84);function s(e){const t=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"Factions"),r.a.createElement("p",null,"Lists all factions you have joined"),r.a.createElement("br",null),r.a.createElement("ul",null,e.player.factions.map(t=>r.a.createElement("li",{key:t},r.a.createElement("a",{className:"a-link-button",onClick:()=>function(t){e.engine.loadFactionContent(),Object(o.a)(t)}(t),style:{padding:"4px",margin:"4px",display:"inline-block"}},t)))),r.a.createElement("br",null),r.a.createElement("h1",null,"Outstanding Faction Invitations"),r.a.createElement("p",{style:{width:"70%"}},"Lists factions you have been invited to. You can accept these faction invitations at any time."),r.a.createElement("ul",null,e.player.factionInvitations.map(e=>r.a.createElement("li",{key:e,style:{padding:"6px",margin:"6px"}},r.a.createElement("p",{style:{display:"inline",margin:"4px",padding:"4px"}},e),r.a.createElement("a",{className:"a-link-button",onClick:a=>function(e,a){e.isTrusted&&(Object(o.e)(i.a[a]),t(e=>!e))}(a,e),style:{display:"inline",margin:"4px",padding:"4px"}},"Accept Faction Invitation")))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(823),o=a(825),s=a(826);function l(e){return r.a.createElement("div",{className:"bladeburner-container"},r.a.createElement("div",{style:{height:"60%",display:"block",position:"relative"}},r.a.createElement("div",{style:{height:"100%",width:"30%",display:"inline-block",border:"1px solid white"}},r.a.createElement(i.a,{bladeburner:e.bladeburner,player:e.player,engine:e.engine})),r.a.createElement(o.a,{bladeburner:e.bladeburner,player:e.player})),r.a.createElement("div",{style:{width:"70%",display:"block",border:"1px solid white",marginTop:"6px",padding:"6px",position:"relative"}},r.a.createElement(s.a,{bladeburner:e.bladeburner,player:e.player})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(12),o=a(42),s=a(11),l=a(184),c=a(2),u=a(9),m=a(17),h=a(24),p=a(84),d=a(824);function f(e){const t=Object(n.useState)(!1)[1];return Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Rank: ",Object(i.c)(e.bladeburner.rank,2),r.a.createElement("span",{className:"tooltiptext"},"Your rank within the Bladeburner division.")),r.a.createElement("br",null),r.a.createElement("p",null,"Stamina: ",Object(i.c)(e.bladeburner.stamina,3)," / ",Object(i.c)(e.bladeburner.maxStamina,3)),r.a.createElement("div",{className:"help-tip",onClick:function(){Object(u.a)("Performing actions will use up your stamina.

Your max stamina is determined primarily by your agility stat.

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

Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).

Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}},"?"),r.a.createElement("br",null),r.a.createElement("p",null,"Stamina Penalty: ",Object(i.c)(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),r.a.createElement("br",null),r.a.createElement("p",null,"Team Size: ",Object(i.c)(e.bladeburner.teamSize,0)),r.a.createElement("p",null,"Team Members Lost: ",Object(i.c)(e.bladeburner.teamLost,0)),r.a.createElement("br",null),r.a.createElement("p",null,"Num Times Hospitalized: ",e.bladeburner.numHosp),r.a.createElement("p",null,"Money Lost From Hospitalizations: ",r.a.createElement(s.a,{money:e.bladeburner.moneyLost})),r.a.createElement("br",null),r.a.createElement("p",null,"Current City: ",e.bladeburner.city),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Population: ",c.a.formatPopulation(e.bladeburner.getCurrentCity().popEst),r.a.createElement("span",{className:"tooltiptext"},"This is your Bladeburner division's estimate of how many Synthoids exist in your current city.")),r.a.createElement("div",{className:"help-tip",onClick:function(){Object(u.a)("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.

Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.

The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}},"?"),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Communities: ",Object(i.c)(e.bladeburner.getCurrentCity().comms,0),r.a.createElement("span",{className:"tooltiptext"},"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"City Chaos: ",Object(i.c)(e.bladeburner.getCurrentCity().chaos),r.a.createElement("span",{className:"tooltiptext"},"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time:"," ",Object(i.b)(e.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3),r.a.createElement("br",null),r.a.createElement("span",{className:"tooltiptext"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.")),r.a.createElement("p",null,"Skill Points: ",Object(i.c)(e.bladeburner.skillPoints,0)),r.a.createElement("br",null),Object(l.a)([["Aug. Success Chance mult: ",Object(i.c)(100*e.player.bladeburner_success_chance_mult,1)+"%"],["Aug. Max Stamina mult: ",Object(i.c)(100*e.player.bladeburner_max_stamina_mult,1)+"%"],["Aug. Stamina Gain mult: ",Object(i.c)(100*e.player.bladeburner_stamina_gain_mult,1)+"%"],["Aug. Field Analysis mult: ",Object(i.c)(100*e.player.bladeburner_analysis_mult,1)+"%"]]),r.a.createElement("br",null),r.a.createElement("a",{onClick:function(){const t="bladeburner-travel-popup";Object(m.a)(t,d.a,{bladeburner:e.bladeburner,popupId:t})},className:"a-link-button",style:{display:"inline-block"}},"Travel"),r.a.createElement("a",{onClick:function(){const t=h.a.Bladeburners;t.isMember?(e.engine.loadFactionContent(),Object(p.a)("Bladeburners")):e.bladeburner.rank>=o.a.RankNeededForFaction?(Object(p.e)(t),Object(u.a)("Congratulations! You were accepted into the Bladeburners faction")):Object(u.a)("You need a rank of 25 to join the Bladeburners Faction!")},className:"a-link-button tooltip",style:{display:"inline-block"}},r.a.createElement("span",{className:"tooltiptext"},"Apply to the Bladeburner Faction, or go to the faction page if you are already a member"),"Faction"),r.a.createElement("br",null),r.a.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(334);function s(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise."),r.a.createElement(o.a,{currentCity:e.bladeburner.city,onTravel:t=>function(t){e.bladeburner.city=t,Object(i.b)(e.popupId)}(t)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n);function i(e){return r.a.createElement("tr",null,r.a.createElement("td",{className:"bladeburner-console-line",style:{color:"var(--my-font-color)",whiteSpace:"pre-wrap"}},e.content))}function o(e){const t=Object(n.useRef)(null),a=Object(n.useState)(!1)[1],[o,s]=Object(n.useState)(e.bladeburner.consoleHistory.length);function l(){t.current&&(t.current.scrollTop=t.current.scrollHeight)}function c(){a(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(c,1e3),t=setInterval(l,100);return()=>{clearInterval(e),clearInterval(t)}},[]),r.a.createElement("div",{ref:t,className:"bladeburner-console-div"},r.a.createElement("table",{className:"bladeburner-console-table"},r.a.createElement("tbody",null,e.bladeburner.consoleLogs.map((e,t)=>r.a.createElement(i,{key:t,content:e})),r.a.createElement("tr",{key:"input",id:"bladeburner-console-input-row",className:"bladeburner-console-input-row"},r.a.createElement("td",{className:"bladeburner-console-input-cell"},r.a.createElement("pre",null,"> "),r.a.createElement("input",{autoFocus:!0,className:"bladeburner-console-input",tabIndex:1,type:"text",onKeyDown:function(t){if(13===t.keyCode){t.preventDefault();const a=t.currentTarget.value;t.currentTarget.value="",a.length>0&&(e.bladeburner.postToConsole("> "+a),e.bladeburner.executeConsoleCommands(e.player,a),s(e.bladeburner.consoleHistory.length),c())}const a=e.bladeburner.consoleHistory;if(38===t.keyCode){let e=o;const n=a.length;if(0===n)return;(e<0||e>n)&&s(n),0!==e&&(e-=1),s(e);const r=a[e];t.currentTarget.value=r}if(40===t.keyCode){const e=o,n=a.length;if(0==n)return;if((e<0||e>n)&&s(n),e==n||e==n-1)s(n),t.currentTarget.value="";else{s(o+1);const e=a[o+1];t.currentTarget.value=e}}}}))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(827),o=a(830),s=a(833),l=a(836),c=a(839),u=a(209);function m(e){const[t,a]=Object(n.useState)("General"),m=Object(n.useState)(!1)[1];function h(e){return r.a.createElement("a",{onClick:()=>a(e.name),className:t!==e.name?"bladeburner-nav-button noselect":"bladeburner-nav-button-inactive noselect"},e.name)}return Object(n.useEffect)(()=>{const e=setInterval(()=>m(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(h,{name:"General"}),r.a.createElement(h,{name:"Contracts"}),r.a.createElement(h,{name:"Operations"}),r.a.createElement(h,{name:"BlackOps"}),r.a.createElement(h,{name:"Skills"}),r.a.createElement("div",{style:{display:"block",margin:"4px",padding:"4px"}},"General"===t&&r.a.createElement(i.a,{bladeburner:e.bladeburner,player:e.player}),"Contracts"===t&&r.a.createElement(o.a,{bladeburner:e.bladeburner,player:e.player}),"Operations"===t&&r.a.createElement(s.a,{bladeburner:e.bladeburner,player:e.player}),"BlackOps"===t&&r.a.createElement(l.a,{bladeburner:e.bladeburner,player:e.player}),"Skills"===t&&r.a.createElement(c.a,{bladeburner:e.bladeburner})),r.a.createElement("span",{className:"text"},u.b," = This action requires stealth, ",u.a," = This action involves retirement"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(828);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(829),o=a(199);function s(e){const t=[];for(const e in o.a)o.a.hasOwnProperty(e)&&t.push(o.a[e]);return r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t.name,className:"bladeburner-action"},r.a.createElement(i.a,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(29),o=a(140),s=a(12),l=a(121);function c(e){const t=Object(n.useState)(!1)[1],a=e.action.name===e.bladeburner.action.name,c=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),u=function(){switch(e.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":return 60;case"Recruitment":return e.bladeburner.getRecruitmentTime(e.player)}return-1}(),m="Recruitment"===e.action.name?Math.max(0,Math.min(e.bladeburner.getRecruitmentSuccessChance(e.player),1)):-1;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(l.b,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(c,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(l.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(o.a)({progress:c/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(){e.bladeburner.action.type=i.a[e.action.name],e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},"Time Required: ",Object(s.b)(1e3*u),-1!==m&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),"Estimated success chance: ",Object(s.c)(100*m,1),"%")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(831);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.",n.createElement("br",null),n.createElement("br",null),"You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(832);function o(e){const t=Object.keys(e.bladeburner.contracts),a=e.bladeburner.contracts;return r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t,className:"bladeburner-action"},r.a.createElement(i.a,{bladeburner:e.bladeburner,action:a[t],player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(29),o=a(140),s=a(12),l=a(209),c=a(42),u=a(335),m=a(121);function h(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.action.type===i.a.Contract&&e.action.name===e.bladeburner.action.name,h=e.action.getEstSuccessChance(e.bladeburner),p=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),d=e.action.level>=e.action.maxLevel,f=e.action.getActionTime(e.bladeburner),g=`bladeburner-${e.action.name}-autolevel-checkbox`;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(m.b,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(p,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(m.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(o.a)({progress:p/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(){e.bladeburner.action.type=i.a.Contract,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},r.a.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(c.a.ContractSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),r.a.createElement("a",{onClick:function(){++e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(d?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),r.a.createElement("a",{onClick:function(){--e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(e.action.level<=1?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},r.a.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),"Estimated success chance: ",r.a.createElement(u.a,{chance:h})," ",e.action.isStealth?l.b:r.a.createElement(r.a.Fragment,null),e.action.isKill?l.a:r.a.createElement(r.a.Fragment,null),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*f),r.a.createElement("br",null),"Contracts remaining: ",Math.floor(e.action.count),r.a.createElement("br",null),"Successes: ",e.action.successes,r.a.createElement("br",null),"Failures: ",e.action.failures),r.a.createElement("br",null),r.a.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:g},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:g,checked:e.action.autoLevel,onChange:function(a){e.action.autoLevel=a.target.checked,t(e=>!e)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(834);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.",n.createElement("br",null),n.createElement("br",null),"Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.",n.createElement("br",null),n.createElement("br",null),"For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.",n.createElement("br",null),n.createElement("br",null),"You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(835);function o(e){const t=Object.keys(e.bladeburner.operations),a=e.bladeburner.operations;return r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t,className:"bladeburner-action"},r.a.createElement(i.a,{bladeburner:e.bladeburner,action:a[t],player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(29),o=a(140),s=a(12),l=a(209),c=a(42),u=a(17),m=a(440),h=a(335),p=a(121);function d(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.action.type===i.a.Operation&&e.action.name===e.bladeburner.action.name,d=e.action.getEstSuccessChance(e.bladeburner),f=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),g=e.action.level>=e.action.maxLevel,y=e.action.getActionTime(e.bladeburner),b=`bladeburner-${e.action.name}-autolevel-checkbox`;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(p.b,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(f,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(p.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(o.a)({progress:f/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(){e.bladeburner.action.type=i.a.Operation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start"),r.a.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";Object(u.a)(t,m.a,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",Object(s.c)(e.action.teamCount,0),")")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},r.a.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(c.a.OperationSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),r.a.createElement("a",{onClick:function(){++e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(g?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),r.a.createElement("a",{onClick:function(){--e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(e.action.level<=1?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},r.a.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),"Estimated success chance: ",r.a.createElement(h.a,{chance:d})," ",e.action.isStealth?l.b:r.a.createElement(r.a.Fragment,null),e.action.isKill?l.a:r.a.createElement(r.a.Fragment,null),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*y),r.a.createElement("br",null),"Operations remaining: ",Math.floor(e.action.count),r.a.createElement("br",null),"Successes: ",e.action.successes,r.a.createElement("br",null),"Failures: ",e.action.failures),r.a.createElement("br",null),r.a.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:b},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:b,checked:e.action.autoLevel,onChange:function(a){e.action.autoLevel=a.target.checked,t(e=>!e)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(837);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.",n.createElement("br",null),n.createElement("br",null),n.createElement("b",null,"Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops."),n.createElement("br",null),n.createElement("br",null),"Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(198),o=a(838);function s(e){let t=[];for(const e in i.a)i.a.hasOwnProperty(e)&&t.push(i.a[e]);return t.sort((function(e,t){return e.reqdRank-t.reqdRank})),t=t.filter((a,n)=>!(null==e.bladeburner.blackops[t[n].name]&&0!==n&&null==e.bladeburner.blackops[t[n-1].name])),t=t.reverse(),r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t.name,className:"bladeburner-action"},r.a.createElement(o.a,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(12),o=a(29),s=a(140),l=a(209),c=a(17),u=a(440),m=a(335),h=a(121);function p(e){const t=Object(n.useState)(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return r.a.createElement("h2",{style:{display:"block"}},e.action.name," (COMPLETED)");const a=e.bladeburner.action.type===o.a.BlackOperation&&e.action.name===e.bladeburner.action.name,p=e.action.getEstSuccessChance(e.bladeburner),d=e.action.getActionTime(e.bladeburner),f=e.bladeburner.rank>=e.action.reqdRank,g=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete);return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(h.b,{value:e.action.name})," (IN PROGRESS - ",Object(i.c)(g,0)," /"," ",Object(i.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(h.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(s.a)({progress:g/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:f?"a-link-button":"a-link-button-inactive",style:{margin:"3px",padding:"3px"},onClick:function(){e.bladeburner.action.type=o.a.BlackOperation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)}},"Start"),r.a.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";Object(c.a)(t,u.a,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",Object(i.c)(e.action.teamCount,0),")")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"block",color:f?"white":"red"}},"Required Rank: ",Object(i.c)(e.action.reqdRank,0)),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},"Estimated Success Chance: ",r.a.createElement(m.a,{chance:p})," ",e.action.isStealth?l.b:r.a.createElement(r.a.Fragment,null),e.action.isKill?l.a:r.a.createElement(r.a.Fragment,null),r.a.createElement("br",null),"Time Required: ",Object(i.b)(1e3*d)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(840),o=a(42),s=a(12);function l(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.skillMultipliers;function l(e){return e&&1!==e}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("strong",null,"Skill Points: ",Object(s.c)(e.bladeburner.skillPoints,0))),r.a.createElement("p",null,"You will gain one skill point every ",o.a.RanksPerSkillPoint," ranks.",r.a.createElement("br",null),r.a.createElement("br",null),"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.",r.a.createElement("br",null)),r.a.createElement("br",null),l(a.successChanceAll)&&r.a.createElement("p",null,"Total Success Chance: x",Object(s.c)(a.successChanceAll,3)),l(a.successChanceStealth)&&r.a.createElement("p",null,"Stealth Success Chance: x",Object(s.c)(a.successChanceStealth,3)),l(a.successChanceKill)&&r.a.createElement("p",null,"Retirement Success Chance: x",Object(s.c)(a.successChanceKill,3)),l(a.successChanceContract)&&r.a.createElement("p",null,"Contract Success Chance: x",Object(s.c)(a.successChanceContract,3)),l(a.successChanceOperation)&&r.a.createElement("p",null,"Operation Success Chance: x",Object(s.c)(a.successChanceOperation,3)),l(a.successChanceEstimate)&&r.a.createElement("p",null,"Synthoid Data Estimate: x",Object(s.c)(a.successChanceEstimate,3)),l(a.actionTime)&&r.a.createElement("p",null,"Action Time: x",Object(s.c)(a.actionTime,3)),l(a.effHack)&&r.a.createElement("p",null,"Hacking Skill: x",Object(s.c)(a.effHack,3)),l(a.effStr)&&r.a.createElement("p",null,"Strength: x",Object(s.c)(a.effStr,3)),l(a.effDef)&&r.a.createElement("p",null,"Defense: x",Object(s.c)(a.effDef,3)),l(a.effDex)&&r.a.createElement("p",null,"Dexterity: x",Object(s.c)(a.effDex,3)),l(a.effAgi)&&r.a.createElement("p",null,"Agility: x",Object(s.c)(a.effAgi,3)),l(a.effCha)&&r.a.createElement("p",null,"Charisma: x",Object(s.c)(a.effCha,3)),l(a.effInt)&&r.a.createElement("p",null,"Intelligence: x",Object(s.c)(a.effInt,3)),l(a.stamina)&&r.a.createElement("p",null,"Stamina: x",Object(s.c)(a.stamina,3)),l(a.money)&&r.a.createElement("p",null,"Contract Money: x",Object(s.c)(a.money,3)),l(a.expGain)&&r.a.createElement("p",null,"Exp Gain: x",Object(s.c)(a.expGain,3)),r.a.createElement("br",null),r.a.createElement(i.a,{bladeburner:e.bladeburner,onUpgrade:()=>t(e=>!e)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(841),i=a(188);function o(e){return n.createElement(n.Fragment,null,Object.keys(i.a).map(t=>n.createElement("li",{key:t,className:"bladeburner-action"},n.createElement(r.a,{bladeburner:e.bladeburner,skill:i.a[t],onUpgrade:e.onUpgrade}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(121),o=a(12);function s(e){const t=e.skill.name;let a=0;e.bladeburner.skills[t]&&!isNaN(e.bladeburner.skills[t])&&(a=e.bladeburner.skills[t]);const n=e.skill.calculateCost(a),s=e.bladeburner.skillPoints>=n,l=!!e.skill.maxLvl&&a>=e.skill.maxLvl;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},r.a.createElement(i.b,{value:e.skill.name})),r.a.createElement("a",{onClick:function(){e.bladeburner.skillPoints{const e=setInterval(()=>l(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement("div",{className:"gang-container"},r.a.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){e.engine.loadFactionContent(),Object(s.a)(e.gang.facName)}},"Back"),r.a.createElement("a",{className:t?"a-link-button-inactive":"a-link-button",style:{display:"inline-block"},onClick:()=>a(!0)},"Gang Management"),r.a.createElement("a",{className:t?"a-link-button":"a-link-button-inactive",style:{display:"inline-block"},onClick:()=>a(!1)},"Gang Territory"),t?r.a.createElement(i.a,{gang:e.gang,player:e.player}):r.a.createElement(o.a,{gang:e.gang}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(844),o=a(846);function s(e){return r.a.createElement("div",{style:{display:"block"}},r.a.createElement("p",{className:"noselect",style:{width:"70%"}},"This page is used to manage your gang members and get an overview of your gang's stats.",r.a.createElement("br",null),r.a.createElement("br",null),"If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '",e.gang.isHackingGang?"Ethical Hacking":"Vigilante Justice","' task to lower your wanted level.",r.a.createElement("br",null),r.a.createElement("br",null),"Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.",r.a.createElement("br",null),r.a.createElement("br",null),"You can also manage your gang programmatically through Netscript using the Gang API"),r.a.createElement("br",null),r.a.createElement(i.a,{gang:e.gang}),r.a.createElement("br",null),r.a.createElement(o.a,{gang:e.gang,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(24),o=a(12),s=a(2),l=a(167),c=a(75),u=a(59),m=a(845);function h(e){const t=100*u.a[e.gang.facName].territory;let a;return a=t<=0?Object(o.c)(0,2):t>=100?Object(o.c)(100,2):Object(o.c)(t,2),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Respect: ",s.a.formatRespect(e.gang.respect)," (",s.a.formatRespect(5*e.gang.respectGainRate)," / sec)",r.a.createElement("span",{className:"tooltiptext"},"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction.")),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level: ",s.a.formatWanted(e.gang.wanted)," (",s.a.formatWanted(5*e.gang.wantedGainRate)," / sec)",r.a.createElement("span",{className:"tooltiptext"},"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.")),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level Penalty: -",Object(o.c)(100*(1-e.gang.getWantedPenalty()),2),"%",r.a.createElement("span",{className:"tooltiptext"},"Penalty for respect and money gain rates due to Wanted Level")),r.a.createElement("br",null),r.a.createElement("div",null,r.a.createElement("p",{style:{display:"inline-block"}},"Money gain rate: ",Object(l.a)(5*e.gang.moneyGainRate))),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Territory: ",a,"%",r.a.createElement("span",{className:"tooltiptext"},"The percentage of total territory your Gang controls")),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"inline-block"}},"Faction reputation: ",Object(c.a)(i.a[e.gang.facName].playerReputation)),r.a.createElement("br",null),r.a.createElement(m.a,{gang:e.gang}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(5),i=a(12);function o(e){const t=1e3/r.a._idleSpeed;if(e.gang.storedCycles/t*1e3<=5e3)return n.createElement(n.Fragment,null);const a=e.gang.storedCycles/t*1e3;return n.createElement(n.Fragment,null,n.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time: ",Object(i.b)(a),n.createElement("span",{className:"tooltiptext noselect"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.")),n.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(847),o=a(848),s=a(17),l=a(854);function c(e){const[t,a]=Object(n.useState)(""),c=Object(n.useState)(!1)[1];const u=e.gang.members.filter(e=>e.name.indexOf(t)>-1||e.task.indexOf(t)>-1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{onRecruit:()=>c(e=>!e),gang:e.gang}),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input noselect",placeholder:"Filter gang member",style:{margin:"5px",padding:"5px"},value:t,onChange:function(e){a(e.target.value)}}),r.a.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){Object(s.a)("gang-upgrade-popup",i.a,{gang:e.gang,player:e.player,popupId:"gang-upgrade-popup"})}},"Manage Equipment"),r.a.createElement("ul",null,u.map(t=>r.a.createElement("li",{key:t.name},r.a.createElement(o.a,{gang:e.gang,member:t})))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(12),o=a(2),s=a(149),l=a(11),c=a(17),u=a(119);function m(e){const t=Object.keys(s.a).filter(t=>{const a=s.a[t];return!e.player.money.gt(e.gang.getUpgradeCost(a))&&(a.type===e.type&&!e.upgrades.includes(t))}).map(e=>s.a[e]);return 0===t.length?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,"Next at ",r.a.createElement(l.a,{money:t[0].cost}))}function h(e){const t=Object(n.useState)(!1)[1];function a(t,a){return Object.keys(s.a).filter(n=>{const r=s.a[n];return!e.player.money.lt(e.gang.getUpgradeCost(r))&&(r.type===a&&!t.includes(n))}).map(e=>s.a[e])}const o=a(e.member.upgrades,u.a.Weapon),c=a(e.member.upgrades,u.a.Armor),h=a(e.member.upgrades,u.a.Vehicle),p=a(e.member.upgrades,u.a.Rootkit),d=a(e.member.augmentations,u.a.Augmentation);function f(e){const t=s.a[e];return r.a.createElement("div",{key:e,className:"gang-owned-upgrade tooltip"},t.name,r.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:t.desc}}))}function g(a,n=!1){return r.a.createElement("a",{key:a.name,className:"a-link-button tooltip",style:{margin:"2px",padding:"2px",display:"block",fontSize:"11px"},onClick:function(){e.member.buyUpgrade(a,e.player,e.gang),t(e=>!e)}},a.name," - ",r.a.createElement(l.a,{money:e.gang.getUpgradeCost(a),player:e.player}),r.a.createElement("span",{className:n?"tooltiptextleft":"tooltiptext",dangerouslySetInnerHTML:{__html:a.desc}}))}const y=e.member.calculateAscensionMult(e.member.hack_asc_points),b=e.member.calculateAscensionMult(e.member.str_asc_points),E=e.member.calculateAscensionMult(e.member.def_asc_points),v=e.member.calculateAscensionMult(e.member.dex_asc_points),k=e.member.calculateAscensionMult(e.member.agi_asc_points),_=e.member.calculateAscensionMult(e.member.cha_asc_points);return r.a.createElement("div",{style:{border:"1px solid white"}},r.a.createElement("h1",null,e.member.name,"(",e.member.task,")"),r.a.createElement("pre",{style:{fontSize:"14px",display:"inline-block",width:"20%"}},"Hack: ",e.member.hack," (x",Object(i.c)(e.member.hack_mult*y,2),")",r.a.createElement("br",null),"Str: ",e.member.str," (x",Object(i.c)(e.member.str_mult*b,2),")",r.a.createElement("br",null),"Def: ",e.member.def," (x",Object(i.c)(e.member.def_mult*E,2),")",r.a.createElement("br",null),"Dex: ",e.member.dex," (x",Object(i.c)(e.member.dex_mult*v,2),")",r.a.createElement("br",null),"Agi: ",e.member.agi," (x",Object(i.c)(e.member.agi_mult*k,2),")",r.a.createElement("br",null),"Cha: ",e.member.cha," (x",Object(i.c)(e.member.cha_mult*_,2),")"),r.a.createElement("div",{className:"gang-owned-upgrades-div noselect"},"Purchased Upgrades: ",e.member.upgrades.map(e=>f(e)),e.member.augmentations.map(e=>f(e))),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Weapons"),o.map(e=>g(e)),r.a.createElement(m,{gang:e.gang,type:u.a.Weapon,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Armor"),c.map(e=>g(e)),r.a.createElement(m,{gang:e.gang,type:u.a.Armor,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Vehicles"),h.map(e=>g(e)),r.a.createElement(m,{gang:e.gang,type:u.a.Vehicle,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Rootkits"),p.map(e=>g(e,!0)),r.a.createElement(m,{gang:e.gang,type:u.a.Rootkit,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Augmentations"),d.map(e=>g(e,!0)),r.a.createElement(m,{gang:e.gang,type:u.a.Augmentation,player:e.player,upgrades:e.member.upgrades})))}function p(e){const t=Object(n.useState)(!1)[1],[a,i]=Object(n.useState)("");function s(t){27===t.keyCode&&Object(c.b)(e.popupId)}return Object(n.useEffect)(()=>{window.addEventListener("keydown",s);const e=setInterval(()=>t(e=>!e),1e3);return()=>{clearInterval(e),window.removeEventListener("keydown",s)}},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("input",{className:"text-input noselect",value:a,placeholder:"Filter gang member",onChange:e=>i(e.target.value)}),r.a.createElement("p",{className:"tooltip",style:{marginLeft:"6px",display:"inline-block"}},"Discount: -",o.a.formatPercentage(1-1/e.gang.getDiscount()),r.a.createElement("span",{className:"tooltiptext noselect"},"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")),e.gang.members.map(t=>r.a.createElement(h,{key:t.name,player:e.player,gang:e.gang,member:t})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(163),o=a(849);function s(e){return r.a.createElement(i.a,{panelInitiallyOpened:!0,headerContent:r.a.createElement(r.a.Fragment,null,e.member.name),panelContent:r.a.createElement(o.a,{gang:e.gang,member:e.member})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(850),o=a(852),s=a(853);function l(e){const t=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"gang-member-info-div tooltip"},r.a.createElement(i.a,{onAscend:()=>t(e=>!e),gang:e.gang,member:e.member})),r.a.createElement("div",{className:"gang-member-info-div"},r.a.createElement(o.a,{onTaskChange:()=>t(e=>!e),gang:e.gang,member:e.member})),r.a.createElement("div",{className:"gang-member-info-div"},r.a.createElement(s.a,{member:e.member})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(9),o=a(12),s=a(2),l=a(17),c=a(851);function u(e){const t={hack:e.member.calculateAscensionMult(e.member.hack_asc_points),str:e.member.calculateAscensionMult(e.member.str_asc_points),def:e.member.calculateAscensionMult(e.member.def_asc_points),dex:e.member.calculateAscensionMult(e.member.dex_asc_points),agi:e.member.calculateAscensionMult(e.member.agi_asc_points),cha:e.member.calculateAscensionMult(e.member.cha_asc_points)};return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{className:"tooltiptext smallfont"},"Hk: x",s.a.formatMultiplier(e.member.hack_mult*t.hack),"(x",s.a.formatMultiplier(e.member.hack_mult)," Eq, x",s.a.formatMultiplier(t.hack)," Asc)",r.a.createElement("br",null),"St: x",s.a.formatMultiplier(e.member.str_mult*t.str),"(x",s.a.formatMultiplier(e.member.str_mult)," Eq, x",s.a.formatMultiplier(t.str)," Asc)",r.a.createElement("br",null),"Df: x",s.a.formatMultiplier(e.member.def_mult*t.def),"(x",s.a.formatMultiplier(e.member.def_mult)," Eq, x",s.a.formatMultiplier(t.def)," Asc)",r.a.createElement("br",null),"Dx: x",s.a.formatMultiplier(e.member.dex_mult*t.dex),"(x",s.a.formatMultiplier(e.member.dex_mult)," Eq, x",s.a.formatMultiplier(t.dex)," Asc)",r.a.createElement("br",null),"Ag: x",s.a.formatMultiplier(e.member.agi_mult*t.agi),"(x",s.a.formatMultiplier(e.member.agi_mult)," Eq, x",s.a.formatMultiplier(t.agi)," Asc)",r.a.createElement("br",null),"Ch: x",s.a.formatMultiplier(e.member.cha_mult*t.cha),"(x",s.a.formatMultiplier(e.member.cha_mult)," Eq, x",s.a.formatMultiplier(t.cha)," Asc)"),r.a.createElement("pre",null,"Hacking: ",Object(o.c)(e.member.hack,0)," (",s.a.formatExp(e.member.hack_exp)," exp)",r.a.createElement("br",null),"Strength: ",Object(o.c)(e.member.str,0)," (",s.a.formatExp(e.member.str_exp)," exp)",r.a.createElement("br",null),"Defense: ",Object(o.c)(e.member.def,0)," (",s.a.formatExp(e.member.def_exp)," exp)",r.a.createElement("br",null),"Dexterity: ",Object(o.c)(e.member.dex,0)," (",s.a.formatExp(e.member.dex_exp)," exp)",r.a.createElement("br",null),"Agility: ",Object(o.c)(e.member.agi,0)," (",s.a.formatExp(e.member.agi_exp)," exp)",r.a.createElement("br",null),"Charisma: ",Object(o.c)(e.member.cha,0)," (",s.a.formatExp(e.member.cha_exp)," exp)",r.a.createElement("br",null)),r.a.createElement("br",null),e.member.canAscend()&&r.a.createElement(r.a.Fragment,null,r.a.createElement("button",{className:"accordion-button noselect",onClick:function(){const t="gang-management-ascend-member "+e.member.name;Object(l.a)(t,c.a,{member:e.member,gang:e.gang,popupId:t,onAscend:e.onAscend})}},"Ascend"),r.a.createElement("div",{className:"help-tip noselect",style:{marginTop:"5px"},onClick:function(){Object(i.a)(r.a.createElement(r.a.Fragment,null,"Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their stat multipliers.",r.a.createElement("br",null),r.a.createElement("br",null),"The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp they have.",r.a.createElement("br",null),r.a.createElement("br",null),"Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect equal to the total respect earned by the member."))}},"?")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(2),o=a(17),s=a(9);function l(e){const t=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]);const a=e.member.getAscensionResults();return r.a.createElement(r.a.Fragment,null,r.a.createElement("pre",null,"Are you sure you want to ascend this member? They will lose all of",r.a.createElement("br",null),"their non-Augmentation upgrades and their stats will reset back to 1.",r.a.createElement("br",null),r.a.createElement("br",null),"Furthermore, your gang will lose ",i.a.formatRespect(e.member.earnedRespect)," respect",r.a.createElement("br",null),r.a.createElement("br",null),"In return, they will gain the following permanent boost to stat multipliers:",r.a.createElement("br",null),"Hacking: x",i.a.format(a.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(a.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(a.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(a.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(a.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(a.cha,"0.000"),r.a.createElement("br",null)),r.a.createElement("button",{className:"std-button",onClick:function(){e.onAscend();const t=e.gang.ascendMember(e.member);Object(s.a)(r.a.createElement("p",null,"You ascended ",e.member.name,"!",r.a.createElement("br",null),r.a.createElement("br",null),"Your gang lost ",i.a.formatRespect(t.respect)," respect.",r.a.createElement("br",null),r.a.createElement("br",null),e.member.name," gained the following stat multipliers for ascending:",r.a.createElement("br",null),"Hacking: x",i.a.format(t.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(t.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(t.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(t.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(t.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(t.cha,"0.000"),r.a.createElement("br",null))),Object(o.b)(e.popupId)}},"Ascend"),r.a.createElement("button",{className:"std-button",onClick:function(){Object(o.b)(e.popupId)}},"Cancel"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(2),o=a(184),s=a(167);function l(e){const[t,a]=Object(n.useState)(e.member.task);const l=e.gang.getAllTaskNames(),c=[["Money:",Object(s.a)(5*e.member.calculateMoneyGain(e.gang))],["Respect:",i.a.formatRespect(5*e.member.calculateRespectGain(e.gang))+" / sec"],["Wanted Level:",i.a.formatWanted(5*e.member.calculateWantedLevelGain(e.gang))+" / sec"],["Total Respect:",""+i.a.formatRespect(e.member.earnedRespect)]];return r.a.createElement(r.a.Fragment,null,r.a.createElement("select",{onChange:function(t){const n=t.target.value;e.member.assignToTask(n),a(n),e.onTaskChange()},className:"dropdown noselect",value:t},r.a.createElement("option",{key:0,value:"---"},"---"),l.map((e,t)=>r.a.createElement("option",{key:t+1,value:e},e))),r.a.createElement("div",null,Object(o.a)(c)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(174);function o(e){const t=i.a[e.member.task],a=t?t.desc:i.a.Unassigned.desc;return r.a.createElement("p",{className:"inline noselect",dangerouslySetInnerHTML:{__html:a}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(855),o=a(223),s=a(12),l=a(17);function c(e){if(e.gang.members.length>=o.a.MaximumGangMembers)return r.a.createElement(r.a.Fragment,null);if(!e.gang.canRecruitMember()){const t=e.gang.getRespectNeededToRecruitMember();return r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:"a-link-button-inactive",style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"),r.a.createElement("p",{style:{margin:"10px",color:"red",display:"inline-block"}},Object(s.c)(t,2)," respect needed to recruit next member"))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:"a-link-button",onClick:function(){const t="recruit-gang-member-popup";Object(l.a)(t,i.a,{gang:e.gang,popupId:t,onRecruit:e.onRecruit})},style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(9);function s(e){const[t,a]=Object(n.useState)("");function s(){""!==t?e.gang.canRecruitMember()?e.gang.recruitMember(t)?(e.onRecruit(),Object(i.b)(e.popupId)):Object(o.a)("You already have a gang member with this name!"):Object(o.a)("You cannot recruit another Gang member!"):Object(o.a)("You must enter a name for your Gang member!")}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"noselect"},"Enter a name for your new Gang member:"),r.a.createElement("br",null),r.a.createElement("input",{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&s()},onChange:function(e){a(e.target.value)},className:"text-input noselect",type:"text",placeholder:"unique name"}),r.a.createElement("a",{className:"std-button",onClick:s},"Recruit Gang Member"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(2),o=a(9),s=a(12),l=a(59);function c(e){function t(e){const t=100*e;return t<=0?Object(s.c)(0,2):t>=100?Object(s.c)(100,2):Object(s.c)(t,2)}const a=l.a[e.gang.facName].power;const n=Object.keys(l.a).filter(t=>t!=e.gang.facName);return r.a.createElement("div",{style:{width:"70%"}},r.a.createElement("p",{className:"noselect"},"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.",r.a.createElement("br",null),r.a.createElement("br",null),"Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash.",r.a.createElement("br",null),r.a.createElement("br",null),"NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.",r.a.createElement("br",null),r.a.createElement("br",null),"The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement("input",{checked:e.gang.territoryWarfareEngaged,id:"warfare",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.territoryWarfareEngaged=t.target.checked}),r.a.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Engage in Territory Warfare",r.a.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%.")),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"inline-block"}},"Territory Clash Chance: ",i.a.formatPercentage(e.gang.territoryClashChance,3)),r.a.createElement("div",{className:"help-tip noselect",style:{display:"inline-block"},onClick:function(){Object(o.a)("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}},"?"),r.a.createElement("br",null),r.a.createElement("input",{checked:e.gang.notifyMemberDeath,id:"notify",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.notifyMemberDeath=t.target.checked}),r.a.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Notify about Gang Member Deaths",r.a.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash.")),r.a.createElement("br",null),r.a.createElement("fieldset",{style:{display:"block",margin:"6px"}},r.a.createElement("p",null,r.a.createElement("b",null,r.a.createElement("u",null,e.gang.facName)),r.a.createElement("br",null),"Power: ",Object(s.c)(l.a[e.gang.facName].power,6),r.a.createElement("br",null),"Territory: ",t(l.a[e.gang.facName].territory),"%",r.a.createElement("br",null),r.a.createElement("br",null),n.map(e=>function(e){const n=l.a[e].power,o=a/(n+a);return r.a.createElement("span",{key:e},r.a.createElement("u",null,e),r.a.createElement("br",null),"Power: ",Object(s.c)(n,6),r.a.createElement("br",null),"Territory: ",t(l.a[e].territory),"%",r.a.createElement("br",null),"Chance to win clash with this gang: ",i.a.formatPercentage(o,3),r.a.createElement("br",null),r.a.createElement("br",null))}(e)))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return Ne}));var n=a(0),r=a.n(n),i=a(20),o=a(19),s=a(397),l=a(214),c=a(1345),u=a(396),m=a(474),h=a(861),p=a.n(h),d=a(860),f=a.n(d),g=a(67),y=a(103),b=a(104),E=a(30),v=a(353),k=a(550),_=a(130),C=a(862),w=a.n(C),S=a(863),x=a.n(S),O=a(864),T=a.n(O),M=a(865),P=a.n(M),A=a(866),R=a.n(A),N=a(868),I=a.n(N),j=a(869),F=a.n(j),D=a(436),B=a.n(D),L=a(870),G=a.n(L),W=a(871),H=a.n(W),U=a(873),q=a.n(U),K=a(874),$=a.n(K),z=a(875),Y=a.n(z),V=a(876),J=a.n(V),Q=a(877),X=a.n(Q),Z=a(878),ee=a.n(Z),te=a(879),ae=a.n(te),ne=a(881),re=a.n(ne),ie=a(882),oe=a.n(ie),se=a(883),le=a.n(se),ce=a(867),ue=a.n(ce),me=a(872),he=a.n(me),pe=a(880),de=a.n(pe),fe=a(391),ge=a.n(fe),ye=a(72),be=a.n(ye),Ee=a(5),ve=a(49),ke=a(441),_e=a(33),Ce=a(122),we=a(118),Se=a(414),xe=a(73),Oe=a(63),Te=a(46);const Me=e=>({width:e.spacing(31),transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),Pe=e=>({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${e.spacing(2)} + 1px)`,[e.breakpoints.up("sm")]:{width:`calc(${e.spacing(7)} + 1px)`}}),Ae=Object(o.a)(c.a,{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>({width:e.spacing(31),flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...Me(e),"& .MuiDrawer-paper":Me(e)},...!t&&{...Pe(e),"& .MuiDrawer-paper":Pe(e)}})),Re=Object(l.a)(e=>Object(s.a)({active:{borderLeft:"3px solid "+_.b.primary},listitem:{}}));function Ne(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const[o,s]=Object(n.useState)("Terminal"),[l,c]=Object(n.useState)(!0),[h,d]=Object(n.useState)(!0),[C,S]=Object(n.useState)(!0),[O,M]=Object(n.useState)(!0),A=ve.a.currStep===ve.d.CharacterGoToTerminalPage||ve.a.currStep===ve.d.ActiveScriptsPage,N=ve.a.currStep===ve.d.GoToCharacterPage,j=ve.a.currStep===ve.d.TerminalGoToActiveScriptsPage,D=ve.a.currStep===ve.d.GoToHacknetNodesPage,L=ve.a.currStep===ve.d.HacknetNodesGoToWorldPage,W=ve.a.currStep===ve.d.WorldDescription,U=e.player.queuedAugmentations.length,K=e.player.factionInvitations.length,z=Object(ke.a)(e.player).length,V=z>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,Q=e.player.factionInvitations.length>0||e.player.factions.length>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,Z=e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,te=e.player.sleeves.length>0,ne=!!e.player.corporation,ie=!!e.player.gang,se=""!==e.player.companyName,ce=e.player.hasWseAccount,me=!!e.player.bladeburner;function pe(){s("Terminal"),e.engine.loadTerminalContent(),A&&Object(ve.b)()}function fe(){s("CreateScripts"),e.engine.loadScriptEditorContent()}function ye(){s("Stats"),e.engine.loadCharacterContent(),N&&Object(ve.b)()}function Me(){s("ActiveScripts"),e.engine.loadActiveScriptsContent(),j&&Object(ve.b)()}function Pe(){s("CreateProgram"),e.engine.loadCreateProgramContent()}function Ne(){s("Factions"),e.engine.loadFactionsContent()}function Ie(){s("Augmentations"),e.engine.loadAugmentationsContent()}function je(){s("Hacknet"),e.engine.loadHacknetNodesContent(),D&&Object(ve.b)()}function Fe(){s("City"),e.engine.loadLocationContent(),L&&Object(ve.b)()}function De(){s("Travel"),e.engine.loadTravelContent()}function Be(){s("Job"),e.engine.loadJobContent()}function Le(){s("Bladeburner"),e.engine.loadBladeburnerContent()}function Ge(){s("Gang"),e.engine.loadGangContent()}function We(){s("Tutorial"),e.engine.loadTutorialContent(),W&&Object(ve.b)()}Object(n.useEffect)(()=>{function t(t){if(!_e.a.DisableHotkeys&&!(e.player.isWorking||Ce.b||we.c||Se.a))if(t.keyCode==xe.a.T&&t.altKey)t.preventDefault(),pe();else if(t.keyCode===xe.a.C&&t.altKey)t.preventDefault(),ye();else if(t.keyCode===xe.a.E&&t.altKey)t.preventDefault(),fe();else if(t.keyCode===xe.a.S&&t.altKey)t.preventDefault(),Me();else if(t.keyCode===xe.a.H&&t.altKey)t.preventDefault(),je();else if(t.keyCode===xe.a.W&&t.altKey)t.preventDefault(),Fe();else if(t.keyCode===xe.a.J&&t.altKey)t.preventDefault(),Be();else if(t.keyCode===xe.a.R&&t.altKey)t.preventDefault(),De();else if(t.keyCode===xe.a.P&&t.altKey)t.preventDefault(),Pe();else if(t.keyCode===xe.a.F&&t.altKey){if(Te.b.isOn(Te.a.Terminal)&&Oe.a.ENABLE_BASH_HOTKEYS)return;t.preventDefault(),Ne()}else t.keyCode===xe.a.A&&t.altKey?(t.preventDefault(),Ie()):t.keyCode===xe.a.U&&t.altKey?(t.preventDefault(),We()):t.keyCode===xe.a.B&&t.altKey?(t.preventDefault(),Le()):t.keyCode===xe.a.G&&t.altKey&&(t.preventDefault(),Ge())}return document.addEventListener("keypress",t),()=>document.removeEventListener("keypress",t)},[]);const He=Re(),[Ue,qe]=Object(n.useState)(!0);return r.a.createElement(_.a,null,r.a.createElement(Ae,{open:Ue,anchor:"left",variant:"permanent"},r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>qe(e=>!e)},r.a.createElement(y.a,null,Ue?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(f.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"Bitburner v",Ee.a.Version)})),r.a.createElement(m.a,null),r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>c(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(w.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"Hacking")}),l?r.a.createElement(ge.a,{color:"primary"}):r.a.createElement(be.a,{color:"primary"})),r.a.createElement(v.a,{in:l,timeout:"auto",unmountOnExit:!0},r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Terminal",className:Object(i.a)({[He.active]:"Terminal"===o}),onClick:pe},r.a.createElement(y.a,null,r.a.createElement(x.a,{color:A?"error":"Terminal"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:A?"error":"Terminal"!==o?"secondary":"primary"},"Terminal"))),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Create Scripts",className:Object(i.a)({[He.active]:"CreateScripts"===o}),onClick:fe},r.a.createElement(y.a,null,r.a.createElement(T.a,{color:"CreateScripts"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"CreateScripts"!==o?"secondary":"primary"},"Create Script"))),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Active Scripts",className:Object(i.a)({[He.active]:"ActiveScripts"===o}),onClick:Me},r.a.createElement(y.a,null,r.a.createElement(P.a,{color:j?"error":"ActiveScripts"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:j?"error":"ActiveScripts"!==o?"secondary":"primary"},"Active Scripts"))),V&&r.a.createElement(g.a,{button:!0,key:"Create Program",className:Object(i.a)({[He.active]:"CreateProgram"===o}),onClick:Pe},r.a.createElement(y.a,null,r.a.createElement(k.a,{badgeContent:z>0?z:void 0,color:"error"},r.a.createElement(R.a,{color:"CreateProgram"!==o?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"CreateProgram"!==o?"secondary":"primary"},"Create Program"))))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>d(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(ue.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"Character")}),h?r.a.createElement(ge.a,{color:"primary"}):r.a.createElement(be.a,{color:"primary"})),r.a.createElement(v.a,{in:h,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Stats",className:Object(i.a)({[He.active]:"Stats"===o}),onClick:ye},r.a.createElement(y.a,null,r.a.createElement(I.a,{color:N?"error":"Stats"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:N?"error":"Stats"!==o?"secondary":"primary"},"Stats"))),Q&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Factions",className:Object(i.a)({[He.active]:"Factions"===o}),onClick:Ne},r.a.createElement(y.a,null,r.a.createElement(k.a,{badgeContent:0!==K?K:void 0,color:"error"},r.a.createElement(F.a,{color:"Factions"!==o?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Factions"!==o?"secondary":"primary"},"Factions"))),Z&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Augmentations",className:Object(i.a)({[He.active]:"Augmentations"===o}),onClick:Ie},r.a.createElement(y.a,null,r.a.createElement(k.a,{badgeContent:0!==U?U:void 0,color:"error"},r.a.createElement(B.a,{style:{transform:"rotate(-90deg)"},color:"Augmentations"!==o?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Augmentations"!==o?"secondary":"primary"},"Augmentations"))),r.a.createElement(g.a,{button:!0,key:"Hacknet",className:Object(i.a)({[He.active]:"Hacknet"===o}),onClick:je},r.a.createElement(y.a,null,r.a.createElement(G.a,{color:D?"error":"Hacknet"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:D?"error":"Hacknet"!==o?"secondary":"primary"},"Hacknet"))),te&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Sleeves",className:Object(i.a)({[He.active]:"Sleeves"===o}),onClick:function(){s("Sleeves"),e.engine.loadSleevesContent()}},r.a.createElement(y.a,null,r.a.createElement(H.a,{color:"Sleeves"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Sleeves"!==o?"secondary":"primary"},"Sleeves")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>S(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(he.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"World")}),C?r.a.createElement(ge.a,{color:"primary"}):r.a.createElement(be.a,{color:"primary"})),r.a.createElement(v.a,{in:C,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"City",className:Object(i.a)({[He.active]:"City"===o}),onClick:Fe},r.a.createElement(y.a,null,r.a.createElement(q.a,{color:L?"error":"City"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:L?"error":"City"!==o?"secondary":"primary"},"City"))),r.a.createElement(g.a,{button:!0,key:"Travel",className:Object(i.a)({[He.active]:"Travel"===o}),onClick:De},r.a.createElement(y.a,null,r.a.createElement($.a,{color:"Travel"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Travel"!==o?"secondary":"primary"},"Travel"))),se&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Job",className:Object(i.a)({[He.active]:"Job"===o}),onClick:Be},r.a.createElement(y.a,null,r.a.createElement(Y.a,{color:"Job"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Job"!==o?"secondary":"primary"},"Job"))),ce&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Stock Market",className:Object(i.a)({[He.active]:"StockMarket"===o}),onClick:function(){s("StockMarket"),e.engine.loadStockMarketContent()}},r.a.createElement(y.a,null,r.a.createElement(J.a,{color:"StockMarket"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"StockMarket"!==o?"secondary":"primary"},"Stock Market"))),me&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Bladeburner",className:Object(i.a)({[He.active]:"Bladeburner"===o}),onClick:Le},r.a.createElement(y.a,null,r.a.createElement(X.a,{color:"Bladeburner"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Bladeburner"!==o?"secondary":"primary"},"Bladeburner"))),ne&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Corp",className:Object(i.a)({[He.active]:"Corp"===o}),onClick:function(){s("Corp"),e.engine.loadCorporationContent()}},r.a.createElement(y.a,null,r.a.createElement(ee.a,{color:"Corp"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Corp"!==o?"secondary":"primary"},"Corp"))),ie&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Gang",className:Object(i.a)({[He.active]:"Gang"===o}),onClick:Ge},r.a.createElement(y.a,null,r.a.createElement(ae.a,{color:"Gang"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Gang"!==o?"secondary":"primary"},"Gang")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>M(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(de.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"Help")}),O?r.a.createElement(ge.a,{color:"primary"}):r.a.createElement(be.a,{color:"primary"})),r.a.createElement(v.a,{in:O,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Milestones",className:Object(i.a)({[He.active]:"Milestones"===o}),onClick:function(){s("Milestones"),e.engine.loadMilestonesContent()}},r.a.createElement(y.a,null,r.a.createElement(re.a,{color:"Milestones"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Milestones"!==o?"secondary":"primary"},"Milestones"))),r.a.createElement(g.a,{button:!0,key:"Tutorial",className:Object(i.a)({[He.active]:"Tutorial"===o}),onClick:We},r.a.createElement(y.a,null,r.a.createElement(oe.a,{color:W?"error":"Tutorial"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:W?"error":"Tutorial"!==o?"secondary":"primary"},"Tutorial"))),r.a.createElement(g.a,{button:!0,key:"Options",className:Object(i.a)({[He.active]:"Options"===o}),onClick:function(){s("Options"),e.engine.loadGameOptionsContent()}},r.a.createElement(y.a,null,r.a.createElement(le.a,{color:"Options"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Options"!==o?"secondary":"primary"},"Options"))),!1))))}},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(466),o=a(885),s=a(17),l=a(886),c=a(41);function u(e){if(0===Object.keys(c.a).sort().filter(t=>void 0===e.corp.divisions.find(e=>e.type===t)).sort().length)return r.a.createElement(r.a.Fragment,null);return r.a.createElement(i.a,{current:!1,onClick:function(){const t="cmpy-mgmt-expand-industry-popup";Object(s.a)(t,o.a,{corp:e.corp,setDivisionName:e.setDivisionName,popupId:t})},text:"Expand into new Industry"})}function m(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[o,s]=Object(n.useState)("Overview");return Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]),r.a.createElement("div",{className:"cmpy-mgmt-container"},r.a.createElement("div",null,r.a.createElement(i.a,{current:"Overview"===o,key:"overview",onClick:()=>s("Overview"),text:e.corp.name}),e.corp.divisions.map(e=>r.a.createElement(i.a,{current:e.name===o,key:e.name,onClick:()=>s(e.name),text:e.name})),r.a.createElement(u,{corp:e.corp,setDivisionName:s})),r.a.createElement(l.a,{rerender:a,corp:e.corp,divisionName:o,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(41),l=a(54);function c(e){const t=Object.keys(s.a).sort().filter(t=>void 0===e.corp.divisions.find(e=>e.type===t)).sort(),[a,c]=Object(n.useState)(t.length>0?t[0]:""),[u,m]=Object(n.useState)("");function h(){try{Object(l.l)(e.corp,a,u)}catch(e){return void Object(i.a)(e+"")}e.setDivisionName(u),Object(o.b)(e.popupId)}const p=s.b[a];if(void 0===p)throw new Error(`Trying to create an industry that doesn't exists: '${a}'`);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Create a new division to expand into a new industry:"),r.a.createElement("select",{className:"dropdown",defaultValue:a,onChange:function(e){c(e.target.value)}},t.map(e=>r.a.createElement("option",{key:e,value:e},e))),r.a.createElement("p",null,p(e.corp)),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",null,"Division name:"),r.a.createElement("input",{autoFocus:!0,value:u,onChange:function(e){m(e.target.value)},onKeyDown:function(e){13===e.keyCode&&h()},type:"text",className:"text-input",style:{display:"block"},maxLength:30,pattern:"[a-zA-Z0-9-_]"}),r.a.createElement("span",{onClick:h,className:"popup-box-button"},"Create Division"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(887),o=a(910),s=a(21);function l(e){const t="Overview"!==e.divisionName?e.corp.divisions.find(t=>t.name===e.divisionName):void 0;return void 0===t?r.a.createElement("div",{id:"cmpy-mgmt-panel"},r.a.createElement(o.a,e)):r.a.createElement("div",{id:"cmpy-mgmt-panel"},r.a.createElement(i.a,{rerender:e.rerender,division:t,corp:e.corp,city:s.a.Sector12,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(529),o=a(888),s=a(17),l=a(889);function c(e){return 0===Object.keys(e.division.offices).filter(t=>0===e.division.offices[t]).length?r.a.createElement(r.a.Fragment,null):r.a.createElement(i.a,{current:!1,key:"Expand into new City",name:"Expand into new City",onClick:function(){const t="cmpy-mgmt-expand-city-popup";Object(s.a)(t,o.a,{popupId:t,corp:e.corp,division:e.division,cityStateSetter:e.setCity})}})}function u(e){const[t,a]=Object(n.useState)(e.city),o=e.division.offices[t];return 0===o?(a("Sector-12"),r.a.createElement(r.a.Fragment,null)):r.a.createElement(r.a.Fragment,null,Object.values(e.division.offices).map(e=>0!==e&&r.a.createElement(i.a,{current:t===e.loc,key:e.loc,name:e.loc,onClick:()=>a(e.loc)})),r.a.createElement(c,{corp:e.corp,division:e.division,setCity:a}),r.a.createElement(l.a,{rerender:e.rerender,corp:e.corp,division:e.division,city:t,warehouse:e.division.warehouses[t],office:o,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(34),o=a(17),s=a(9),l=a(54),c=a(91);function u(e){const t=Object(n.useRef)(null);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Would you like to expand into a new city by opening an office? This would cost"," ",r.a.createElement(c.a,{money:i.a.OfficeInitialCost,corp:e.corp})),r.a.createElement("select",{ref:t,className:"dropdown",style:{margin:"5px"}},Object.keys(e.division.offices).filter(t=>0===e.division.offices[t]).map(e=>r.a.createElement("option",{key:e,value:e},e))),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:function(){if(null!==t.current){try{Object(l.k)(e.corp,e.division,t.current.value)}catch(e){return void Object(s.a)(e+"")}Object(s.a)(`Opened a new office in ${t.current.value}!`),e.cityStateSetter(t.current.value),Object(o.b)(e.popupId)}},disabled:e.corp.funds.lt(0)},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(890),o=a(894),s=a(898);function l(e){return r.a.createElement("div",null,r.a.createElement("div",{className:"cmpy-mgmt-industry-left-panel"},r.a.createElement(o.a,{rerender:e.rerender,player:e.player,corp:e.corp,division:e.division,currentCity:e.city,office:e.office}),r.a.createElement(i.a,{rerender:e.rerender,player:e.player,corp:e.corp,division:e.division,office:e.office})),r.a.createElement("div",{className:"cmpy-mgmt-industry-right-panel"},r.a.createElement(s.a,{rerender:e.rerender,player:e.player,corp:e.corp,currentCity:e.city,division:e.division,warehouse:e.warehouse})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(36),o=a(2),s=a(530),l=a(17),c=a(891),u=a(892),m=a(893),h=a(11);function p(e,t){let a=0;for(let n=0;ne.switchMode(e=>!e)},"Switch to Auto Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job")):r.a.createElement("button",{className:"std-button tooltip",onClick:()=>e.switchMode(e=>!e)},"Switch to Manual Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs"))}function f(e){const[t,a]=Object(n.useState)(e.office.employees.length>0?e.office.employees[0]:null),l=[];for(let t=0;t0?"std-button":"a-link-button-inactive",onClick:function(){a<=0?console.warn("Cannot assign employee. No unassigned employees available"):(e.office.assignEmployeeToJob(e.job),e.office.calculateEmployeeProductivity(e.corp,e.division),e.rerender())}},"+"),r.a.createElement("button",{className:t>0?"std-button":"a-link-button-inactive",onClick:function(){e.office.unassignEmployeeFromJob(e.job),e.office.calculateEmployeeProductivity(e.corp,e.division),e.rerender()}},"-"),r.a.createElement("br",null))}function y(e){const t=p(e.office.employees,i.a.Unassigned),a=1===e.corp.unlockUpgrades[4];let n=0,s=0,l=0,c=0;for(let t=0;t0&&(u=n/e.office.employees.length,m=s/e.office.employees.length,d=l/e.office.employees.length),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("strong",null,"Unassigned Employees: ",t)),r.a.createElement("br",null),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Avg Employee Morale:")),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(u,"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Avg Employee Happiness:")),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(m,"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Avg Employee Energy:")),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(d,"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Total Employee Salary:")),r.a.createElement("td",null,r.a.createElement("p",null,r.a.createElement(h.a,{money:c})))),a&&r.a.createElement(r.a.Fragment,null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Material Production:",r.a.createElement("span",{className:"tooltiptext"},"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"))),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(e.division.getOfficeProductivity(e.office),"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Product Production:",r.a.createElement("span",{className:"tooltiptext"},"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"))),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(e.division.getOfficeProductivity(e.office,{forProduct:!0}),"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Business Multiplier:",r.a.createElement("span",{className:"tooltiptext"},"The effect this office's 'Business' employees has on boosting sales"))),r.a.createElement("td",null,r.a.createElement("p",null,"x",o.a.format(e.division.getBusinessFactor(e.office),"0.000"))))))),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Operations,desc:"Manages supply chain operations. Improves the amount of Materials and Products you produce."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Engineer,desc:"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)"}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Business,desc:"Handles sales and finances. Improves the amount of Materials and Products you can sell."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Management,desc:"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.RandD,desc:"Research new innovative ways to improve the company. Generates Scientific Research."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Training,desc:"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations."}))}function b(e){const[t,a]=Object(n.useState)(!1),i={fontSize:"13px"};let o="tooltip";e.office.atCapacity()?o+=" a-link-button-inactive":(o+=" std-button",0===e.office.employees.length&&(o+=" flashing-button"));let s="tooltip";return e.office.atCapacity()?s+=" a-link-button-inactive":s+=" std-button",r.a.createElement("div",{className:"cmpy-mgmt-employee-panel"},r.a.createElement("h1",{style:{margin:"4px 0px 5px 0px"}},"Office Space"),r.a.createElement("p",null,"Size: ",e.office.employees.length," / ",e.office.size," employees"),r.a.createElement("button",{className:o,onClick:function(){const t="cmpy-mgmt-hire-employee-popup";Object(l.a)(t,u.a,{rerender:e.rerender,office:e.office,corp:e.corp,popupId:t,player:e.player})},style:i},"Hire Employee",0===e.office.employees.length&&r.a.createElement("span",{className:"tooltiptext"},"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position")),r.a.createElement("button",{className:s,onClick:function(){e.office.atCapacity()||(e.office.hireRandomEmployee(),e.rerender())},style:i},"Autohire Employee",r.a.createElement("span",{className:"tooltiptext"},"Automatically hires an employee and gives him/her a random name")),r.a.createElement("br",null),r.a.createElement("button",{className:"std-button tooltip",onClick:function(){const t="cmpy-mgmt-upgrade-office-size-popup";Object(l.a)(t,c.a,{rerender:e.rerender,office:e.office,corp:e.corp,popupId:t,player:e.player})},style:i,disabled:e.corp.funds.lt(0)},"Upgrade size",r.a.createElement("span",{className:"tooltiptext"},"Upgrade the office's size so that it can hold more employees!")),!e.division.hasResearch("AutoPartyManager")&&r.a.createElement("button",{className:"std-button tooltip",onClick:function(){const t="cmpy-mgmt-throw-office-party-popup";Object(l.a)(t,m.a,{office:e.office,corp:e.corp,popupId:t})},style:i,disabled:e.corp.funds.lt(0)},"Throw Party",r.a.createElement("span",{className:"tooltiptext"},'"Throw an office party to increase your employee\'s morale and happiness"')),r.a.createElement("br",null),r.a.createElement("div",null,r.a.createElement(d,{manualMode:t,switchMode:a})),t?r.a.createElement(f,{rerender:e.rerender,corp:e.corp,division:e.division,office:e.office,player:e.player}):r.a.createElement(y,{rerender:e.rerender,corp:e.corp,division:e.division,office:e.office,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(17),o=a(2),s=a(9),l=a(34),c=a(54);function u(e){const t=Math.round(e.office.size/l.a.OfficeInitialSize),a=l.a.OfficeInitialCost*Math.pow(1.09,t);let n=0;for(let e=0;e<5;++e)n+=Math.pow(1.09,t+e);const u=l.a.OfficeInitialCost*n,m=e.corp.funds.dividedBy(l.a.OfficeInitialCost).toNumber();let h=1;for(n=Math.pow(1.09,t);h<50&&!(n>=m);){const e=Math.pow(1.09,t+h);if(n+e>m)break;n+=e,++h}const p=l.a.OfficeInitialCost*n;function d(t,a){e.corp.funds.lt(t)?Object(s.a)("You don't have enough company funds to purchase this upgrade!"):(Object(c.y)(e.corp,e.office,a),Object(s.a)("Office space increased! It can now hold "+e.office.size+" employees"),e.rerender()),Object(i.b)(e.popupId)}function f(e){return r.a.createElement("button",{className:"tooltip "+(e.corp.funds.lt(e.cost)?"a-link-button-inactive":"a-link-button"),style:{display:"inline-block",margin:"4px"},onClick:()=>d(e.cost,e.size)},"by ",e.size,r.a.createElement("span",{className:"tooltiptext"},o.a.formatMoney(e.cost)))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Increase the size of your office space to fit additional employees!"),r.a.createElement("p",null,"Upgrade size: "),r.a.createElement(f,{corp:e.corp,cost:a,size:l.a.OfficeInitialSize}),r.a.createElement(f,{corp:e.corp,cost:u,size:5*l.a.OfficeInitialSize}),r.a.createElement(f,{corp:e.corp,cost:p,size:h*l.a.OfficeInitialSize}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(17),o=a(2),s=a(34),l=a(16),c=a(12),u=a(339),m=a(9);function h(e){const[t,a]=Object(n.useState)("");function o(){for(let a=0;a
This division's production multiplier is calculated by summing the individual production multiplier of each of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial to expand into new cities as this can greatly increase the production multiplier of your entire Division.

Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):

Hardware:    ${t(e.division.hwFac)}
Robots:      ${t(e.division.robFac)}
AI Cores:    ${t(e.division.aiFac)}
Real Estate: `+t(e.division.reFac))}},"?"),r.a.createElement("br",null)," ",r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip"},"Scientific Research: ",s.a.format(e.division.sciResearch.qty,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Scientific Research increases the quality of the materials and products that you produce.")),r.a.createElement("button",{className:"help-tip",onClick:function(){const t="corporation-research-popup-box";Object(h.a)(t,m.a,{industry:e.division,popupId:t})}},"Research"))}(),r.a.createElement("br",null),r.a.createElement("u",{className:"industry-purchases-and-upgrades-header"},"Purchases & Upgrades"),r.a.createElement("br",null),function(){const a=[];for(const i in o.a){const s=o.a[i];if(e.division.hasResearch("AutoBrew")&&"Coffee"===s[4])continue;const l=s[0],c=s[1],u=s[2];let m=0;switch(l){case 0:m=e.office.employees.length*c;break;default:m=c*Math.pow(u,e.division.upgrades[l])}function n(){e.corp.funds.lt(m)||(e.corp.funds=e.corp.funds.minus(m),e.division.upgrade(s,{corporation:e.corp,office:e.office}),e.rerender())}a.push(t({key:i,onClick:n,text:r.a.createElement(r.a.Fragment,null,s[4]," - ",r.a.createElement(d.a,{money:m,corp:e.corp})),tooltip:s[5]}))}return a}()," ",r.a.createElement("br",null),e.division.makesProducts&&a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(41),l=a(54);function c(e){const t=Object.keys(e.division.offices).filter(t=>0!==e.division.offices[t]),[a,c]=Object(n.useState)(t.length>0?t[0]:""),[u,m]=Object(n.useState)(""),[h,p]=Object(n.useState)(null),[d,f]=Object(n.useState)(null);if(e.division.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);function g(){if(null!==h&&null!==d){try{Object(l.j)(e.corp,e.division,a,u,h,d)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.popupText}}),r.a.createElement("select",{className:"dropdown",style:{margin:"5px"},onChange:function(e){c(e.target.value)},defaultValue:a},t.map(e=>r.a.createElement("option",{key:e,value:e},e))),r.a.createElement("input",{onChange:function(e){m(e.target.value)},className:"text-input",style:{margin:"5px"},placeholder:(y=e.division.type,y===s.a.Food?"Restaurant Name":y===s.a.Healthcare?"Hospital Name":y===s.a.RealEstate?"Property Name":"Product Name")}),r.a.createElement("br",null),r.a.createElement("input",{onChange:function(e){""===e.target.value?p(null):p(parseFloat(e.target.value))},autoFocus:!0,type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Design investment"}),r.a.createElement("input",{onChange:function(e){""===e.target.value?f(null):f(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&g()},type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Marketing investment"}),r.a.createElement("button",{className:"std-button",onClick:g},"Develop Product"));var y}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(41),l=a(34),c=a(897),u=a(54);function m(e){const t=s.c[e.industry.type];return void 0===t?r.a.createElement(r.a.Fragment,null):(Object(n.useEffect)(()=>{{const t=document.getElementById(e.popupId+"-content");null!=t&&(t.style.minHeight="80vh")}const a=t.createTreantMarkup();a.chart.container="#"+e.popupId+"-content",a.chart.nodeAlign="BOTTOM",a.chart.rootOrientation="WEST",a.chart.siblingSeparation=40,a.chart.connectors={type:"step",style:{"arrow-end":"block-wide-long",stroke:"white","stroke-width":2}},Object(c.Treant)(a);const n=t.getAllNodes();for(let t=0;t{try{Object(u.n)(e.industry,n[t])}catch(e){Object(i.a)(e+"")}Object(i.a)(`Researched ${n[t]}. It may take a market cycle (~${l.a.SecsPerMarketCycle} seconds) before the effects of the Research apply.`),Object(o.b)(e.popupId)}):console.warn("Could not find Research Tree div for "+a)}}),r.a.createElement("div",{id:e.popupId},r.a.createElement("div",{id:e.popupId+"outer-box"}),r.a.createElement("div",null,"Multipliers from research:",r.a.createElement("br",null),"* Advertising Multiplier: x",t.getAdvertisingMultiplier(),r.a.createElement("br",null),"* Employee Charisma Multiplier: x",t.getEmployeeChaMultiplier(),r.a.createElement("br",null),"* Employee Creativity Multiplier: x",t.getEmployeeCreMultiplier(),r.a.createElement("br",null),"* Employee Efficiency Multiplier: x",t.getEmployeeEffMultiplier(),r.a.createElement("br",null),"* Employee Intelligence Multiplier: x",t.getEmployeeIntMultiplier(),r.a.createElement("br",null),"* Production Multiplier: x",t.getProductionMultiplier(),r.a.createElement("br",null),"* Sales Multiplier: x",t.getSalesMultiplier(),r.a.createElement("br",null),"* Scientific Research Multiplier: x",t.getScientificResearchMultiplier(),r.a.createElement("br",null),"* Storage Multiplier: x",t.getStorageMultiplier())))}},,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return IndustryWarehouse}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_data_Constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(34),_OfficeSpace__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(275),_Material__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(128),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(296),_Warehouse__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(172),_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(899),_ExportPopup__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(900),_LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(901),_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(902),_SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(903),_SellProductPopup__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(904),_PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(905),_ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(906),_SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(907),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(2),_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(17),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(82),_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(11),_MoneyCost__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(91),_Helpers__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(908),_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(909),_Actions__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(54);function ProductComponent(props){const corp=props.corp,division=props.division,city=props.city,product=props.product,nf="0.000",nfB="0.000a",hasUpgradeDashboard=division.hasResearch("uPgrade: Dashboard"),totalGain=product.data[city][1]-product.data[city][2];let sellButtonText;if(sellButtonText=product.sllman[city][0]?Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(product.sllman[city][1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][2],nfB),"/",product.sllman[city][1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][2],nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.sllman[city][1],nfB),")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)"),product.marketTa2)sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:product.marketTa2Price[city]}));else if(product.marketTa1){const e=product.rat/product.mku;sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:product.pCost+e}))}else if(product.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(product.sCost)){const sCost=product.sCost.replace(/MP/g,product.pCost+"");sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:eval(sCost)}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:product.sCost}));function openSellProductPopup(){const e="cmpy-mgmt-limit-product-production-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_SellProductPopup__WEBPACK_IMPORTED_MODULE_11__.a,{product:product,city:city,popupId:e})}let limitProductionButtonText="Limit Production";function openLimitProductProdutionPopup(){const e="cmpy-mgmt-limit-product-production-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__.a,{product:product,city:city,popupId:e})}function openDiscontinueProductPopup(){const e="cmpy-mgmt-discontinue-product-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__.a,{rerender:props.rerender,product:product,industry:division,corp:props.corp,popupId:e,player:props.player})}function openProductMarketTaPopup(){const e="cmpy-mgmt-marketta-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__.a,{product:product,industry:division,popupId:e})}return product.prdman[city][0]&&(limitProductionButtonText+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.prdman[city][1],nf)+")"),product.fin?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},product.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][0],nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(totalGain,nfB),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][1],nfB),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][2],nfB)," /s")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.rat,nf),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.qlt,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.per,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.dur,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.rel,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.aes,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.fea,nf),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.cmp,nf))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Production Cost:"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatMoney(product.pCost/_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.ProductProductionCostRatio),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of the material cost it takes to create this Product.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatMoney(product.pCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openSellProductPopup},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openLimitProductProdutionPopup},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openDiscontinueProductPopup},"Discontinue"),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openProductMarketTaPopup},"Market-TA"))):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Designing ",product.name," (req. Operations/Engineers in ",product.createCity,")..."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.prog,"0.00"),"% complete"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),hasUpgradeDashboard&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openSellProductPopup},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openLimitProductProdutionPopup},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openDiscontinueProductPopup},"Discontinue"),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openProductMarketTaPopup},"Market-TA")))}function MaterialComponent(props){const corp=props.corp,division=props.division,warehouse=props.warehouse,city=props.city,mat=props.mat,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__.a))throw new Error(`Could not get OfficeSpace object for this city (${city})`);const nf="0.000",nfB="0.000a",totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,tutorial=division.newInd&&Object.keys(division.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,purchaseButtonText=`Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.buy,nfB)})`,purchaseButtonClass=tutorial?"std-button flashing-button tooltip":"std-button";function openPurchaseMaterialPopup(){const e="cmpy-mgmt-material-purchase-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__.a,{mat:mat,industry:division,warehouse:warehouse,corp:props.corp,popupId:e})}function openExportPopup(){const e="cmpy-mgmt-export-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_ExportPopup__WEBPACK_IMPORTED_MODULE_7__.a,{mat:mat,corp:props.corp,popupId:e})}let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(mat.sllman[1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sll,nfB),"/",mat.sllman[1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sll,nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sllman[1],nfB),")"),mat.marketTa2)sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:mat.marketTa2Price}));else if(mat.marketTa1)sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:mat.bCost+markupLimit}));else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(mat.sCost)){const sCost=mat.sCost.replace(/MP/g,mat.bCost+"");sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:eval(sCost)}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:mat.sCost}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)");function openSellMaterialPopup(){const e="cmpy-mgmt-material-sell-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__.a,{mat:mat,corp:props.corp,popupId:e})}function openMaterialMarketTaPopup(){const e="cmpy-mgmt-export-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__.a,{mat:mat,industry:division,corp:props.corp,popupId:e})}function shouldFlash(){return props.division.prodMats.includes(props.mat.name)&&!mat.sllman[0]}return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-material-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(totalGain,nfB),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.imp,nfB),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.cmp,nf))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatMoney(mat.bCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Market Price: The price you would pay if you were to buy this material on the market"))," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.qlt,"0.00a"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"The quality of your material. Higher quality will lead to more sales"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:purchaseButtonClass,onClick:openPurchaseMaterialPopup,disabled:props.warehouse.smartSupplyEnabled&&Object.keys(props.division.reqMats).includes(props.mat.name)},purchaseButtonText,tutorial&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Purchase your required materials to get production started!")),1===corp.unlockUpgrades[0]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openExportPopup},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button"+(shouldFlash()?" flashing-button":""),onClick:openSellMaterialPopup},sellButtonText),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openMaterialMarketTaPopup},"Market-TA")))}function IndustryWarehouse(e){return e.warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__.a?function(){if(0===e.warehouse)return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null);const t={color:e.warehouse.sizeUsed>=e.warehouse.size?"red":"white",margin:"5px"},a=_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseUpgradeBaseCost*Math.pow(1.07,e.warehouse.level+1),n=e.corp.funds.gt(a)?"std-button":"a-link-button-inactive",r=[];for(const t in e.division.reqMats)if(e.division.reqMats.hasOwnProperty(t)){const a=[" *",e.division.reqMats[t],t].join(" ");r.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:t},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,a)))}let i;switch(e.division.state){case"START":i="Current state: Preparing...";break;case"PURCHASE":i="Current state: Purchasing materials...";break;case"PRODUCTION":i="Current state: Producing materials and/or products...";break;case"SALE":i="Current state: Selling materials and/or products...";break;case"EXPORT":i="Current state: Exporting materials and/or products...";break;default:console.error("Invalid state: "+e.division.state)}const o=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof _Material__WEBPACK_IMPORTED_MODULE_3__.a&&Object(_Helpers__WEBPACK_IMPORTED_MODULE_20__.a)(t,e.division)&&o.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent,{rerender:e.rerender,city:e.currentCity,corp:e.corp,division:e.division,key:t,mat:e.warehouse.materials[t],warehouse:e.warehouse}));const s=[];if(e.division.makesProducts&&Object.keys(e.division.products).length>0)for(const t in e.division.products){const a=e.division.products[t];a instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.a&&s.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent,{rerender:e.rerender,player:e.player,city:e.currentCity,corp:e.corp,division:e.division,key:t,product:a}))}return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip",style:t},"Storage: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatBigNumber(e.warehouse.sizeUsed)," /"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatBigNumber(e.warehouse.size),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:e.warehouse.breakdown}})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:n,onClick:function(){null!==e.division&&0!==e.warehouse&&(++e.warehouse.level,e.warehouse.updateSize(e.corp,e.division),e.corp.funds=e.corp.funds.minus(a),e.rerender())}},"Upgrade Warehouse Size - ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__.a,{money:a,corp:e.corp})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"This industry uses the following equation for it's production: "),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__.a,{division:e.division}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,i),e.corp.unlockUpgrades[1]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:function(){if(0===e.warehouse)return;const t="cmpy-mgmt-smart-supply-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(t,_SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__.a,{division:e.division,warehouse:e.warehouse,corp:e.corp,player:e.player,popupId:t})}},"Configure Smart Supply")),o,s)}():react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:()=>{return t=e.division,a=e.currentCity,Object(_Actions__WEBPACK_IMPORTED_MODULE_22__.m)(e.corp,t,a),void e.rerender();var t,a},disabled:e.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost)},"Purchase Warehouse (",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__.a,{money:_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost,corp:e.corp}),")"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(17);function o(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no longer produce this product and all of its existing stock will be removed and left unsold"),r.a.createElement("button",{className:"popup-box-button",onClick:function(){e.industry.discontinueProduct(e.product),Object(i.b)(e.popupId),e.rerender()}},"Discontinue"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(54);function l(e){if(0===e.corp.divisions.length)throw new Error("Export popup created with no divisions.");if(0===Object.keys(e.corp.divisions[0].warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[t,a]=Object(n.useState)(e.corp.divisions[0].name),[l,c]=Object(n.useState)(Object.keys(e.corp.divisions[0].warehouses)[0]),[u,m]=Object(n.useState)(""),h=Object(n.useState)(!1)[1];function p(t){for(let a=0;a!e)}const d=e.corp.divisions.find(e=>e.name===t);if(void 0===d)throw new Error(`Export popup somehow ended up with undefined division '${d}'`);const f=Object.keys(d.warehouses).filter(e=>0!==d.warehouses[e]);return f.length>0&&!f.includes(l)&&c(f[0]),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse."),r.a.createElement("select",{className:"dropdown",onChange:function(e){a(e.target.value)},defaultValue:t},e.corp.divisions.map(e=>r.a.createElement("option",{key:e.name,value:e.name},e.name))),r.a.createElement("select",{className:"dropdown",onChange:function(e){c(e.target.value)},defaultValue:l},f.map(e=>{if(0!==d.warehouses[e])return r.a.createElement("option",{key:e,value:e},e)})),r.a.createElement("input",{className:"text-input",placeholder:"Export amount / s",onChange:function(e){m(e.target.value)}}),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:function(){try{Object(s.e)(t,l,e.mat,u)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}},"Export"),r.a.createElement("p",null,"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."),e.mat.exp.map((e,t)=>r.a.createElement("div",{key:t,className:"cmpy-mgmt-existing-export",onClick:()=>p(e)},"Industry: ",e.ind,r.a.createElement("br",null),"City: ",e.city,r.a.createElement("br",null),"Amount/s: ",e.amt)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(54);function s(e){const[t,a]=Object(n.useState)(null);function s(){let a=t;null===a&&(a=-1),Object(o.i)(e.product,e.city,a),Object(i.b)(e.popupId)}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit."),r.a.createElement("input",{autoFocus:!0,className:"text-input",style:{margin:"5px"},placeholder:"Limit",type:"number",onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&s()}}),r.a.createElement("button",{className:"std-button",style:{margin:"5px",display:"inline-block"},onClick:s},"Limit production"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(2);function o(e){if(!e.industry.hasResearch("Market-TA.II"))return r.a.createElement(r.a.Fragment,null);const[t,a]=Object(n.useState)(e.mat.bCost),o=Object(n.useState)(!1)[1];const s=e.mat.getMarkupLimit();const l=t;let c=1;return l>e.mat.bCost?l-e.mat.bCost>s&&(c=Math.pow(s/(l-e.mat.bCost),2)):l!e)},checked:e.mat.marketTa2,style:{margin:"3px"}})),r.a.createElement("p",null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function s(e){const t=Object(n.useState)(!1)[1];const a=e.mat.getMarkupLimit();return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.I")),r.a.createElement("br",null),"The maximum sale price you can mark this up to is ",i.a.formatMoney(e.mat.bCost+a),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa1-checkbox",style:{color:"white"}},"Use Market-TA.I for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)")),r.a.createElement("input",{id:"cmpy-mgmt-marketa1-checkbox",type:"checkbox",onChange:function(a){e.mat.marketTa1=a.target.checked,t(e=>!e)},checked:e.mat.marketTa1,style:{margin:"3px"}})),r.a.createElement(o,{mat:e.mat,industry:e.industry}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(54);function l(e){const[t,a]=Object(n.useState)(e.mat.sllman[1]?e.mat.sllman[1]+"":""),[l,c]=Object(n.useState)(function(e){let t=e.sCost?e.sCost+"":"";return e.marketTa2?t+=" (Market-TA.II)":e.marketTa1&&(t+=" (Market-TA.I)"),t}(e.mat));function u(){try{Object(s.o)(e.mat,t,l)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}function m(e){13===e.keyCode&&u()}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the maximum amount of ",e.mat.name," you would like to sell per second, as well as the price at which you would like to sell at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price."),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input",value:t,autoFocus:!0,type:"text",placeholder:"Sell amount",style:{marginTop:"4px"},onChange:function(e){a(e.target.value)},onKeyDown:m}),r.a.createElement("input",{className:"text-input",value:l,type:"text",placeholder:"Sell price",style:{marginTop:"4px"},onChange:function(e){c(e.target.value)},onKeyDown:m}),r.a.createElement("button",{className:"std-button",onClick:u},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(54);function l(e){const[t,a]=Object(n.useState)(!0),[l,c]=Object(n.useState)(e.product.sllman[e.city][1]?e.product.sllman[e.city][1]:""),[u,m]=Object(n.useState)(function(e){let t=e.sCost?e.sCost+"":"";return e.marketTa2?t+=" (Market-TA.II)":e.marketTa1&&(t+=" (Market-TA.I)"),t}(e.product));function h(){try{Object(s.p)(e.product,e.city,l,u,t)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}function p(e){13===e.keyCode&&h()}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the maximum amount of ",e.product.name," you would like to sell per second, as well as the price at which you would like to sell it at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price."),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input",value:l,autoFocus:!0,type:"text",placeholder:"Sell amount",style:{marginTop:"4px"},onChange:function(e){c(e.target.value)},onKeyDown:p}),r.a.createElement("input",{className:"text-input",value:u,type:"text",placeholder:"Sell price",style:{marginTop:"4px"},onChange:function(e){m(e.target.value)},onKeyDown:p}),r.a.createElement("button",{className:"std-button",onClick:h},"Confirm"),r.a.createElement("div",{style:{border:"1px solid white",display:"inline-block"}},r.a.createElement("label",{htmlFor:e.popupId+"-checkbox"},"Use same 'Sell Amount' for all cities"),r.a.createElement("input",{checked:t,onChange:function(e){a(e.target.checked)},id:e.popupId+"-checkbox",style:{margin:"2px"},type:"checkbox"})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(137),l=a(2),c=a(54);function u(e){const t=parseFloat(e.amount),a=t*e.mat.bCost,n=s.a[e.mat.name];return t*n>(e.warehouse.size-e.warehouse.sizeUsed)/n?r.a.createElement(r.a.Fragment,null,"Not enough warehouse space to purchase this amount"):isNaN(a)?r.a.createElement(r.a.Fragment,null,"Invalid put for Bulk Purchase amount"):r.a.createElement(r.a.Fragment,null,"Purchasing ",l.a.format(t,"0,0.00")," of ",e.mat.name," will cost"," ",l.a.formatMoney(a))}function m(e){const[t,a]=Object(n.useState)("");return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of ",e.mat.name," you would like to bulk purchase. This purchases the specified amount instantly (all at once)."),r.a.createElement(u,{warehouse:e.warehouse,mat:e.mat,amount:t}),r.a.createElement("input",{onChange:function(e){a(e.target.value)},type:"number",placeholder:"Bulk Purchase amount",style:{margin:"5px"},onKeyDown:function(a){13===a.keyCode&&function(){const a=parseFloat(t),n=s.a[e.mat.name];if(a*n>(e.warehouse.size-e.warehouse.sizeUsed)/n)Object(i.a)("You do not have enough warehouse size to fit this purchase");else if(isNaN(a))Object(i.a)("Invalid input amount");else{const t=a*e.mat.bCost;if(!e.corp.funds.gt(t))return void Object(i.a)("You cannot afford this purchase.");e.corp.funds=e.corp.funds.minus(t),e.mat.qty+=a,Object(o.b)(e.popupId)}}()}}),r.a.createElement("button",{className:"std-button"},"Confirm Bulk Purchase"))}function h(e){const[t,a]=Object(n.useState)(e.mat.buy?e.mat.buy:null);function s(){if(null!==t){try{Object(c.c)(e.mat,t)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of ",e.mat.name," you would like to purchase per second. This material's cost changes constantly."),r.a.createElement("input",{onChange:function(e){a(parseFloat(e.target.value))},className:"text-input",autoFocus:!0,placeholder:"Purchase amount",type:"number",style:{margin:"5px"},onKeyDown:function(e){13===e.keyCode&&s()}}),r.a.createElement("button",{onClick:s,className:"std-button"},"Confirm"),r.a.createElement("button",{onClick:function(){e.mat.buy=0,Object(o.b)(e.popupId)},className:"std-button"},"Clear Purchase"),e.industry.hasResearch("Bulk Purchasing")&&r.a.createElement(m,{corp:e.corp,mat:e.mat,industry:e.industry,warehouse:e.warehouse,popupId:e.popupId}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(2);function o(e){const t=e.product.rat/e.product.mku,[a,o]=Object(n.useState)(e.product.pCost),s=Object(n.useState)(!1)[1];const l=a;let c=1;return l>e.product.pCost&&l-e.product.pCost>t&&(c=t/(l-e.product.pCost)),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("br",null),r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.II")),r.a.createElement("br",null),"If you sell at ",i.a.formatMoney(l),", then you will sell"," ",i.a.format(c,"0.00000"),"x as much compared to if you sold at market price."),r.a.createElement("input",{className:"text-input",onChange:function(e){o(parseFloat(e.target.value))},value:a,type:"number",style:{marginTop:"4px"}}),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa2-checkbox",style:{color:"white"}},"Use Market-TA.II for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Product will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold).")),r.a.createElement("input",{className:"text-input",onChange:function(t){e.product.marketTa2=t.target.checked,s(e=>!e)},id:"cmpy-mgmt-marketa2-checkbox",style:{margin:"3px"},type:"checkbox",checked:e.product.marketTa2})),r.a.createElement("p",null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function s(e){const t=e.product.rat/e.product.mku,a=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.I")),r.a.createElement("br",null),"The maximum sale price you can mark this up to is"," ",i.a.formatMoney(e.product.pCost+t),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales."),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa1-checkbox",style:{color:"white"}},"Use Market-TA.I for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Product will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above).")),r.a.createElement("input",{onChange:function(t){e.product.marketTa1=t.target.checked,a(e=>!e)},className:"text-input",id:"cmpy-mgmt-marketa1-checkbox",style:{margin:"3px"},type:"checkbox",checked:e.product.marketTa1})),e.industry.hasResearch("Market-TA.II")&&r.a.createElement(o,{product:e.product,industry:e.industry,popupId:e.popupId}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(54),o=a(128),s=a(9);function l(e){const[t,a]=Object(n.useState)(!!e.warehouse.smartSupplyUseLeftovers[e.matName]);const o=e.matName+"-use-leftovers";return r.a.createElement("div",{key:e.matName},r.a.createElement("label",{style:{color:"white"},htmlFor:o},e.warehouse.materials[e.matName].name),r.a.createElement("input",{type:"checkbox",id:o,onChange:function(t){try{const a=e.warehouse.materials[e.matName];Object(i.v)(e.warehouse,a,t.target.checked)}catch(e){Object(s.a)(e+"")}a(t.target.checked)},style:{margin:"3px"},checked:t}),r.a.createElement("br",null))}function c(e){const t=Object(n.useState)(!1)[1];const a=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof o.a&&Object.keys(e.division.reqMats).includes(t)&&a.push(r.a.createElement(l,{key:t,warehouse:e.warehouse,matName:t}));return r.a.createElement(r.a.Fragment,null,r.a.createElement("label",{style:{color:"white"},htmlFor:"cmpy-mgmt-smart-supply-checkbox"},"Enable Smart Supply"),r.a.createElement("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",onChange:function(a){Object(i.u)(e.warehouse,a.target.checked),t(e=>!e)},style:{margin:"3px"},checked:e.warehouse.smartSupplyEnabled}),r.a.createElement("br",null),r.a.createElement("p",null,"Use materials already in the warehouse instead of buying new ones, if available:"),a)}},function(e,t,a){"use strict";function n(e,t){return!!Object.keys(t.reqMats).includes(e)||(!!t.prodMats.includes(e)||!!["Hardware","Robots","AICores","RealEstate"].includes(e))}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(194);function o(e){const t=[];for(const a of Object.keys(e.division.reqMats)){const n=e.division.reqMats[a];void 0!==n&&t.push(String.raw`${n}\text{ }${a}`)}const a=e.division.prodMats.slice();return e.division.makesProducts&&a.push(e.division.type),r.a.createElement("span",{className:"text"},r.a.createElement(i.a,{display:!1,tex:t.join("+")+String.raw`\Rightarrow`+a.map(e=>String.raw`1\text{ }${e}`).join("+")}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(911),o=a(912),s=a(913),l=a(914),c=a(915),u=a(916),m=a(917),h=a(918),p=a(919),d=a(34),f=a(322),g=a(323),y=a(5),b=a(2),E=a(12),v=a(17),k=a(11);function _({corp:e,player:t,rerender:a}){const n=e.revenue.minus(e.expenses).toNumber();return r.a.createElement("div",null,r.a.createElement("p",null,"Total Funds: ",r.a.createElement(k.a,{money:e.funds.toNumber()}),r.a.createElement("br",null),"Total Revenue: ",r.a.createElement(k.a,{money:e.revenue.toNumber()})," / s",r.a.createElement("br",null),"Total Expenses: ",r.a.createElement(k.a,{money:e.expenses.toNumber()})," / s",r.a.createElement("br",null),"Total Profits: ",r.a.createElement(k.a,{money:n})," / s",r.a.createElement("br",null),r.a.createElement(T,{corp:e,profit:n}),"Publicly Traded: ",e.public?"Yes":"No",r.a.createElement("br",null),"Owned Stock Shares: ",b.a.format(e.numShares,"0.000a"),r.a.createElement("br",null),"Stock Price: ",e.public?r.a.createElement(k.a,{money:e.sharePrice}):"N/A",r.a.createElement("br",null)),r.a.createElement("p",{className:"tooltip"},"Total Stock Shares: ",b.a.format(e.totalShares,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Outstanding Shares: ",b.a.format(e.issuedShares,"0.000a"),r.a.createElement("br",null),"Private Shares: ",b.a.format(e.totalShares-e.issuedShares-e.numShares,"0.000a"))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(M,{name:"Production Multiplier: ",mult:e.getProductionMultiplier()}),r.a.createElement(M,{name:"Storage Multiplier: ",mult:e.getStorageMultiplier()}),r.a.createElement(M,{name:"Advertising Multiplier: ",mult:e.getAdvertisingMultiplier()}),r.a.createElement(M,{name:"Empl. Creativity Multiplier: ",mult:e.getEmployeeCreMultiplier()}),r.a.createElement(M,{name:"Empl. Charisma Multiplier: ",mult:e.getEmployeeChaMultiplier()}),r.a.createElement(M,{name:"Empl. Intelligence Multiplier: ",mult:e.getEmployeeIntMultiplier()}),r.a.createElement(M,{name:"Empl. Efficiency Multiplier: ",mult:e.getEmployeeEffMultiplier()}),r.a.createElement(M,{name:"Sales Multiplier: ",mult:e.getSalesMultiplier()}),r.a.createElement(M,{name:"Scientific Research Multiplier: ",mult:e.getScientificResearchMultiplier()}),r.a.createElement("br",null),r.a.createElement(P,{corp:e}),r.a.createElement("div",null,r.a.createElement(x,{className:"a-link-button",display:"inline-block",onClick:()=>e.getStarterGuide(t),text:"Getting Started Guide",tooltip:"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file that guides you through the beginning of setting up a Corporation and provides some tips/pointers for helping you get started with managing it."}),e.public?r.a.createElement(S,{corp:e,player:t,rerender:a}):r.a.createElement(C,{corp:e,player:t,rerender:a}),r.a.createElement(O,{corp:e,player:t})),r.a.createElement("br",null),r.a.createElement(w,{corp:e,player:t,rerender:a}))}function C({corp:e,player:t,rerender:a}){const n=e.fundingRound<4,i=n?"std-button":"a-link-button-inactive",o=n?"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company":void 0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(x,{className:i,onClick:function(){const n="cmpy-mgmt-find-investors-popup";Object(v.a)(n,h.a,{rerender:a,player:t,popupId:n,corp:e})},text:"Find Investors",tooltip:o,display:"inline-block"}),r.a.createElement(x,{className:"std-button",onClick:function(){const n="cmpy-mgmt-go-public-popup";Object(v.a)(n,p.a,{rerender:a,player:t,popupId:n,corp:e})},display:"inline-block",text:"Go Public",tooltip:"Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a public company, your shares will be traded on the stock market."}),r.a.createElement("br",null))}function w({corp:e,player:t,rerender:a}){return e.divisions.length<=0?r.a.createElement("h1",null,"Upgrades are unlocked once you create an industry."):r.a.createElement("div",{className:"cmpy-mgmt-upgrade-container"},r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Unlocks "),Object.values(f.a).filter(t=>0===e.unlockUpgrades[t[0]]).map(n=>r.a.createElement(o.a,{rerender:a,player:t,corp:e,upgradeData:n,key:n[0]})),r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Upgrades "),e.upgrades.map((e,t)=>g.a[t]).map(n=>r.a.createElement(i.a,{rerender:a,player:t,corp:e,upgrade:n,key:n[0]})))}function S({corp:e,player:t,rerender:a}){const n=e.shareSaleCooldown>0,i=n?"a-link-button-inactive":"std-button",o=n?"Cannot sell shares for "+e.convertCooldownToString(e.shareSaleCooldown):"Sell your shares in the company. The money earned from selling your shares goes into your personal account, not the Corporation's. This is one of the only ways to profit from your business venture.",s=e.issueNewSharesCooldown>0,h=s?"a-link-button-inactive":"std-button",p=s?"Cannot issue new shares for "+e.convertCooldownToString(e.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.a.createElement(r.a.Fragment,null,r.a.createElement(x,{className:i,display:"inline-block",onClick:function(){const n="cmpy-mgmt-sell-shares-popup";Object(v.a)(n,l.a,{corp:e,player:t,popupId:n,rerender:a})},text:"Sell Shares",tooltip:o}),r.a.createElement(x,{className:"std-button",display:"inline-block",onClick:function(){const n="corp-buyback-shares-popup";Object(v.a)(n,c.a,{rerender:a,player:t,popupId:n,corp:e})},text:"Buyback shares",tooltip:"Buy back shares you that previously issued or sold at market price."}),r.a.createElement("br",null),r.a.createElement(x,{className:h,display:"inline-block",onClick:function(){const t="cmpy-mgmt-issue-new-shares-popup";Object(v.a)(t,m.a,{popupId:t,corp:e})},text:"Issue New Shares",tooltip:p}),r.a.createElement(x,{className:"std-button",display:"inline-block",onClick:function(){const t="cmpy-mgmt-issue-dividends-popup";Object(v.a)(t,u.a,{popupId:t,corp:e})},text:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)"}),r.a.createElement("br",null))}function x({className:e="std-button",text:t,display:a,tooltip:n,onClick:i}){const o=null!=n;return o&&(e+=" tooltip"),r.a.createElement("button",{className:e,onClick:i,style:{display:a||"block"}},t,o&&r.a.createElement("span",{className:"tooltiptext"},n))}function O({player:e,corp:t}){const a=t.determineValuation()>=d.a.BribeThreshold||!0,n=a?"a-link-button":"a-link-button-inactive";return r.a.createElement(x,{className:n,display:"inline-block",onClick:function(){Object(v.a)("corp-bribe-popup",s.a,{player:e,popupId:"corp-bribe-popup",corp:t})},text:"Bribe Factions",tooltip:a?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"})}function T({corp:e,profit:t}){if(e.dividendPercentage<=0||t<=0)return r.a.createElement(r.a.Fragment,null);const a=e.dividendPercentage/100*t,n=t-a,i=a/e.totalShares,o=e.numShares*i;return r.a.createElement(r.a.Fragment,null,"Retained Profits (after dividends): ",r.a.createElement(k.a,{money:n})," / s",r.a.createElement("br",null),r.a.createElement("br",null),"Dividend Percentage: ",b.a.format(e.dividendPercentage/100,"0%"),r.a.createElement("br",null),"Dividends per share: ",r.a.createElement(k.a,{money:i})," / s",r.a.createElement("br",null),"Your earnings as a shareholder (Pre-Tax): ",r.a.createElement(k.a,{money:o})," / s",r.a.createElement("br",null),"Dividend Tax Rate: ",e.dividendTaxPercentage,"%",r.a.createElement("br",null),"Your earnings as a shareholder (Post-Tax):"," ",r.a.createElement(k.a,{money:o*(1-e.dividendTaxPercentage/100)})," / s",r.a.createElement("br",null),r.a.createElement("br",null))}function M({name:e,mult:t}){return t<=1?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,e,b.a.format(t,"0.000"),r.a.createElement("br",null))}function P({corp:e}){const t=e.storedCycles*y.a.MilliPerCycle;return t<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,"Bonus time: ",Object(E.b)(t),r.a.createElement("br",null),r.a.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(54),s=a(91);function l(e){const t=e.upgrade,a=e.corp.upgrades[t[0]],n=t[1],l=t[2],c=n*Math.pow(l,a),u=r.a.createElement(r.a.Fragment,null,t[4]," - ",r.a.createElement(s.a,{money:c,corp:e.corp})),m=t[5];return r.a.createElement("button",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(c)){try{Object(o.h)(e.corp,e.upgrade)}catch(e){Object(i.a)(e+"")}e.rerender()}}},u,r.a.createElement("span",{className:"tooltiptext"},m))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(54),s=a(91);function l(e){const t=e.upgradeData,a=r.a.createElement(r.a.Fragment,null,t[2]," - ",r.a.createElement(s.a,{money:t[1],corp:e.corp})),n=t[3];return r.a.createElement("button",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(t[1])){try{Object(o.x)(e.corp,e.upgradeData)}catch(e){Object(i.a)(e+"")}e.rerender()}}},a,r.a.createElement("span",{className:"tooltiptext"},n))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(24),o=a(34),s=a(2),l=a(17),c=a(9);function u(e){const[t,a]=Object(n.useState)(0),[u,m]=Object(n.useState)(0),[h,p]=Object(n.useState)(e.player.factions.length>0?e.player.factions[0]:"");function d(t,a){return(t+a*e.corp.sharePrice)/o.a.BribeToRepRatio}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation."),r.a.createElement("select",{className:"dropdown",style:{margin:"3px"},defaultValue:h,onChange:function(e){p(e.target.value)}},e.player.factions.map(e=>{if(i.a[e].getInfo().offersWork())return r.a.createElement("option",{key:e,value:e},e)})),r.a.createElement("p",null,function(t,a){return 0===t&&0===a?"":isNaN(t)||isNaN(a)||t<0||a<0?"ERROR: Invalid value(s) entered":e.corp.funds.lt(t)?"ERROR: You do not have this much money to bribe with":a>e.corp.numShares?"ERROR: You do not have this many shares to bribe with":"You will gain "+s.a.formatReputation(d(t,a))+" reputation with "+h+" with this bribe"}(t||0,u||0)),r.a.createElement("input",{className:"text-input",onChange:function(e){a(parseFloat(e.target.value))},placeholder:"Corporation funds",style:{margin:"5px"}}),r.a.createElement("input",{className:"text-input",onChange:function(e){m(parseFloat(e.target.value))},placeholder:"Stock Shares",style:{margin:"5px"}}),r.a.createElement("button",{className:"a-link-button",onClick:()=>function(t,a){const n=i.a[h];if(null==n&&Object(c.a)("ERROR: You must select a faction to bribe"),isNaN(t)||isNaN(a)||t<0||a<0);else if(e.corp.funds.lt(t));else if(a>e.corp.numShares);else{const r=d(t,a);Object(c.a)("You gained "+s.a.formatReputation(r)+" reputation with "+n.name+" by bribing them."),n.playerReputation+=r,e.corp.funds=e.corp.funds.minus(t),e.corp.numShares-=a,Object(l.b)(e.popupId)}}(t||0,u||0),style:{display:"inline-block"}},"Bribe"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(2),o=a(9),s=a(17),l=a(34);function c(e){const[t,a]=Object(n.useState)(null);function c(){if(null!==t)if(isNaN(t)||t<=0)Object(o.a)("ERROR: Invalid value for number of shares");else if(t>e.corp.numShares)Object(o.a)("ERROR: You don't have this many shares to sell");else{const a=e.corp.calculateShareSale(t),n=a[0],r=a[1],c=a[2];if(e.corp.numShares-=t,isNaN(e.corp.issuedShares)){console.error("Corporation issuedShares is NaN: "+e.corp.issuedShares);const t=e.corp.issuedShares;isNaN(t)?e.corp.issuedShares=0:e.corp.issuedShares=t}e.corp.issuedShares+=t,e.corp.sharePrice=r,e.corp.shareSalesUntilPriceUpdate=c,e.corp.shareSaleCooldown=l.a.SellSharesCooldown,e.player.gainMoney(n),e.player.recordMoneySource(n,"corporation"),Object(s.b)(e.popupId),Object(o.a)(`Sold ${i.a.formatMoney(t)} shares for `+i.a.formatMoney(n)+". "+`The corporation's stock price fell to ${i.a.formatMoney(e.corp.sharePrice)} as a result of dilution.`),e.rerender()}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation).",r.a.createElement("br",null),r.a.createElement("br",null),"Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a large number of shares all at once will have an immediate effect in reducing your stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"The current price of your company's stock is ",i.a.formatMoney(e.corp.sharePrice)),r.a.createElement((function(e){if(null===e.shares)return r.a.createElement(r.a.Fragment,null);if(isNaN(e.shares)||e.shares<=0)return r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to sell");if(e.shares>e.corp.numShares)return r.a.createElement(r.a.Fragment,null,"You don't have this many shares to sell!");{const t=e.corp.calculateShareSale(e.shares)[0];return r.a.createElement(r.a.Fragment,null,"Sell ",e.shares," shares for a total of ",i.a.formatMoney(t))}}),{shares:t,corp:e.corp}),r.a.createElement("br",null),r.a.createElement("input",{autoFocus:!0,className:"text-input",type:"number",placeholder:"Shares to sell",style:{margin:"5px"},onChange:function(e){""===e.target.value?a(null):a(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{onClick:c,className:"a-link-button",style:{display:"inline-block"}},"Sell shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(17),o=a(2),s=a(9);function l(e){const[t,a]=Object(n.useState)(null);const l=1.1*e.corp.sharePrice;function c(){if(null===t)return;const a=1.1*e.corp.sharePrice;if(isNaN(t)||t<=0)Object(s.a)("ERROR: Invalid value for number of shares");else if(t>e.corp.issuedShares)Object(s.a)("ERROR: There are not this many oustanding shares to buy back");else if(t*a>e.player.money)Object(s.a)("ERROR: You do not have enough money to purchase this many shares (you need "+o.a.format(t*a,"$0.000a")+")");else{if(e.corp.numShares+=t,isNaN(e.corp.issuedShares)){console.warn("Corporation issuedShares is NaN: "+e.corp.issuedShares),console.warn("Converting to number now");const t=e.corp.issuedShares;isNaN(t)?e.corp.issuedShares=0:e.corp.issuedShares=t}e.corp.issuedShares-=t,e.player.loseMoney(t*a),Object(i.b)(e.popupId),e.rerender()}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium. However, repurchasing shares from the market tends to lead to an increase in stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"To purchase these shares, you must use your own money (NOT your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"The current buyback price of your company's stock is ",o.a.formatMoney(l),". Your company currently has ",o.a.formatBigNumber(e.corp.issuedShares)," outstanding stock shares."),r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):isNaN(t)||t<=0?r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to buyback"):t>e.corp.issuedShares?r.a.createElement(r.a.Fragment,null,"There are not this many shares available to buy back. There are only"," ",o.a.formatBigNumber(e.corp.issuedShares)," outstanding shares."):r.a.createElement(r.a.Fragment,null,"Purchase ",t," shares for a total of ",o.a.formatMoney(t*l))}),null),r.a.createElement("br",null),r.a.createElement("input",{autoFocus:!0,className:"text-input",type:"number",placeholder:"Shares to buyback",style:{margin:"5px"},onChange:function(e){""===e.target.value?a(null):a(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{onClick:c,className:"a-link-button",style:{display:"inline-block"}},"Buy shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(17),o=a(9),s=a(34),l=a(54);function c(e){const[t,a]=Object(n.useState)(null);function c(){if(null!==t){try{Object(l.g)(e.corp,t/100)}catch(e){Object(o.a)(e+"")}Object(i.b)(e.popupId)}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.",r.a.createElement("br",null),r.a.createElement("br",null),"In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an integer between 0 and ",s.a.DividendMaxPercentage,". (A percentage of 0 means no dividends will be issued",r.a.createElement("br",null),r.a.createElement("br",null),"Two important things to note:",r.a.createElement("br",null),"* Issuing dividends will negatively affect your corporation's stock price",r.a.createElement("br",null),"* Dividends are taxed. Taxes start at 50%, but can be decreased",r.a.createElement("br",null),r.a.createElement("br",null),"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes."),r.a.createElement("input",{autoFocus:!0,onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&c()},className:"text-input",placeholder:"Dividend %",type:"number",style:{margin:"5px"}}),r.a.createElement("button",{onClick:c,className:"std-button",style:{display:"inline-block"}},"Allocate Dividend Percentage"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(2),o=a(9),s=a(17),l=a(16),c=a(34);function u(e){if(null===e.shares)return r.a.createElement(r.a.Fragment,null);const t=Math.round(.9*e.corp.sharePrice),a=Math.round(.2*e.corp.totalShares),n=a-a%1e6;let o=e.shares;return isNaN(o)?r.a.createElement("p",null,"Invalid input"):(o/=1e7,o=1e7*Math.round(o),o<1e7?r.a.createElement("p",null,"Must issue at least 10 million new shares"):o>n?r.a.createElement("p",null,"You cannot issue that many shares"):r.a.createElement("p",null,"Issue $",i.a.format(o,"0.000a")," new shares for"," ",i.a.formatMoney(o*t),"?"))}function m(e){const[t,a]=Object(n.useState)(null),m=Math.round(.2*e.corp.totalShares),h=m-m%1e6;function p(){if(null===t)return;const a=Math.round(.9*e.corp.sharePrice);let n=t;if(isNaN(n))return void Object(o.a)("Invalid input for number of new shares");if(n=1e7*Math.round(n/1e7),n<1e7||n>h)return void Object(o.a)("Invalid input for number of new shares");const r=n*a;e.corp.issueNewSharesCooldown=c.a.IssueNewSharesCooldown,e.corp.totalShares+=n;let u=Object(l.a)(0,Math.round(n/2));u=1e6*Math.round(u/1e6),e.corp.issuedShares+=n-u,e.corp.funds=e.corp.funds.plus(r),e.corp.immediatelyUpdateSharePrice(),Object(s.b)(e.popupId),Object(o.a)(`Issued ${i.a.format(n,"0.000a")} and raised ${i.a.formatMoney(r)}. ${i.a.format(u,"0.000a")} of these shares were bought by private investors.

Stock price decreased to `+i.a.formatMoney(e.corp.sharePrice))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.",r.a.createElement("br",null),r.a.createElement("br",null)," * You can issue at most ",i.a.formatMoney(h)," new shares",r.a.createElement("br",null)," * New shares are sold at a 10% discount",r.a.createElement("br",null)," * You can only issue new shares once every 12 hours",r.a.createElement("br",null)," * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share",r.a.createElement("br",null)," * Number of new shares issued must be a multiple of 10 million",r.a.createElement("br",null),r.a.createElement("br",null),"When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares. If they choose to exercise this option, these newly issued shares become private, restricted shares, which means you cannot buy them back."),r.a.createElement(u,{corp:e.corp,shares:t}),r.a.createElement("input",{className:"text-input",autoFocus:!0,placeholder:"# New Shares",style:{margin:"5px"},onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&p()}}),r.a.createElement("button",{onClick:p,className:"std-button",style:{display:"inline-block"}},"Issue New Shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(17),o=a(2),s=a(34);function l(e){const t=e.corp.determineValuation();let a=0,n=4;switch(e.corp.fundingRound){case 0:a=.1,n=4;break;case 1:a=.35,n=3;break;case 2:a=.25,n=3;break;case 3:a=.2,n=2.5;break;default:return r.a.createElement(r.a.Fragment,null)}const l=t*a*n,c=Math.floor(s.a.INITIALSHARES*a);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"An investment firm has offered you ",o.a.formatMoney(l)," in funding in exchange for a"," ",o.a.format(100*a,"0.000a"),"% stake in the company (",o.a.format(c,"0.000a")," shares).",r.a.createElement("br",null),r.a.createElement("br",null),"Do you accept or reject this offer?",r.a.createElement("br",null),r.a.createElement("br",null),"Hint: Investment firms will offer more money if your corporation is turning a profit"),r.a.createElement("button",{onClick:function(){e.corp.fundingRound++,e.corp.addFunds(l),e.corp.numShares-=c,e.rerender(),Object(i.b)(e.popupId)},className:"std-button"},"Accept"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(2);function l(e){const[t,a]=Object(n.useState)(""),l=e.corp.determineValuation()/e.corp.totalShares;function c(){const a=parseFloat(t),n=e.corp.determineValuation()/e.corp.totalShares;isNaN(a)?Object(i.a)("Invalid value for number of issued shares"):a>e.corp.numShares?Object(i.a)("Error: You don't have that many shares to issue!"):(e.corp.public=!0,e.corp.sharePrice=n,e.corp.issuedShares=a,e.corp.numShares-=a,e.corp.addFunds(a*n),e.rerender(),Object(i.a)(`You took your ${e.corp.name} public and earned `+s.a.formatMoney(a*n)+" in your IPO"),Object(o.b)(e.popupId))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive ",s.a.formatMoney(l)," per share (the IPO money will be deposited directly into your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"You have a total of ",s.a.format(e.corp.numShares,"0.000a")," of shares that you can issue."),r.a.createElement("input",{className:"text-input",value:t,onChange:function(e){a(e.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{className:"std-button",onClick:c},"Go Public"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(442),o=a(922);const s={Cost:"Cost",Hacking:"Hacking Level",Strength:"Strength Level",Defense:"Defense Level",Dexterity:"Dexterity Level",Agility:"Agility Level",Charisma:"Charisma Level",AverageCombatStats:"Average Combat Stats",AverageAllStats:"Average Stats",TotalNumAugmentations:"Number of Augmentations"};function l(...e){let t=0;for(let a=0;ae.getCost()-t.getCost(),Hacking:(e,t)=>e.hacking_skill-t.hacking_skill,Strength:(e,t)=>e.strength-t.strength,Defense:(e,t)=>e.defense-t.defense,Dexterity:(e,t)=>e.dexterity-t.dexterity,Agility:(e,t)=>e.agility-t.agility,Charisma:(e,t)=>e.charisma-t.charisma,AverageCombatStats:(e,t)=>l(e.strength,e.defense,e.dexterity,e.agility)-l(t.strength,t.defense,t.dexterity,t.agility),AverageAllStats:(e,t)=>l(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-l(t.hacking_skill,t.strength,t.defense,t.dexterity,t.agility,t.charisma),TotalNumAugmentations:(e,t)=>e.augmentations.length-t.augmentations.length};function u(e){const[t,a]=Object(n.useState)(s.Cost);0===e.player.resleeves.length&&(e.player.resleeves=Object(i.a)());const l=c[t];if(void 0===l)throw new Error(`sort function '${t}' is undefined`);return e.player.resleeves.sort(l),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{style:{display:"block",width:"75%"}},"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!",r.a.createElement("br",null),r.a.createElement("br",null),"Re-sleeving will change your experience for every stat. It will also REMOVE all of your currently-installed Augmentations, and replace them with the ones provided by the purchased sleeve. However, Augmentations that you have purchased but not installed will NOT be removed. If you have purchased an Augmentation and then re-sleeve into a body which already has that Augmentation, it will be removed (since you cannot have duplicate Augmentations).",r.a.createElement("br",null),r.a.createElement("br",null),"NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File."),r.a.createElement("p",{style:{display:"inline-block"}},"Sort By: "),r.a.createElement("select",{className:"dropdown",defaultValue:t,onChange:function(e){a(e.target.value)}},Object.keys(s).map(e=>r.a.createElement("option",{key:e,value:e},s[e]))),e.player.resleeves.map((t,a)=>r.a.createElement(o.a,{key:a,player:e.player,resleeve:t})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(152),r=a(18),i=a(14);class o extends n.a{constructor(){super()}getCost(){const e=this.hacking_exp+this.strength_exp+this.defense_exp+this.dexterity_exp+this.agility_exp+this.charisma_exp;let t=0;for(let e=0;er.a.createElement("option",{key:e.name,value:e.name},e.name))),r.a.createElement("p",null,void 0!==u&&u.info)),r.a.createElement("div",{className:"resleeve-panel",style:{width:"20%"}},r.a.createElement("p",null,"It costs ",r.a.createElement(s.a,{money:m,player:e.player})," to purchase this Sleeve."),r.a.createElement("button",{className:"std-button",onClick:function(){Object(o.b)(e.resleeve,e.player)&&Object(c.a)(r.a.createElement(r.a.Fragment,null,"You re-sleeved for ",r.a.createElement(s.a,{money:m}),"!"))}},"Purchase")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(214),o=a(397),s=a(30),l=a(398),c=a(70),u=a(256),m=a(257),h=a(287),p=a(116),d=a(48),f=a(215),g=a(396),y=a(67),b=a(354),E=a(105),v=a(924),k=a(927),_=a(33);const C=Object(i.a)(e=>Object(o.a)({root:{width:50,padding:2,userSelect:"none"},pad:{padding:2}}));function w(e){const t=C(),[a,i]=Object(n.useState)(_.a.CodeInstructionRunTime),[o,w]=Object(n.useState)(_.a.MaxLogCapacity),[S,x]=Object(n.useState)(_.a.MaxPortCapacity),[O,T]=Object(n.useState)(_.a.MaxTerminalCapacity),[M,P]=Object(n.useState)(_.a.AutosaveInterval),[A,R]=Object(n.useState)(_.a.SuppressMessages),[N,I]=Object(n.useState)(_.a.SuppressFactionInvites),[j,F]=Object(n.useState)(_.a.SuppressTravelConfirmation),[D,B]=Object(n.useState)(_.a.SuppressBuyAugmentationConfirmation),[L,G]=Object(n.useState)(_.a.SuppressHospitalizationPopup),[W,H]=Object(n.useState)(_.a.SuppressBladeburnerPopup),[U,q]=Object(n.useState)(_.a.DisableHotkeys),[K,$]=Object(n.useState)(_.a.DisableASCIIArt),[z,Y]=Object(n.useState)(_.a.DisableTextEffects),[V,J]=Object(n.useState)(_.a.Locale),[Q,X]=Object(n.useState)(!1),[Z,ee]=Object(n.useState)(!1);return r.a.createElement("div",{className:t.root,style:{width:"90%"}},r.a.createElement(s.a,{variant:"h4",gutterBottom:!0},"Options"),r.a.createElement(c.a,{container:!0,spacing:3},r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(g.a,null,r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low can result in poor performance if you have many scripts running.")},r.a.createElement(s.a,null,"Netscript exec time (ms)")),r.a.createElement(l.a,{value:a,onChange:function(e,t){i(t),_.a.CodeInstructionRunTime=t},step:1,min:10,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a lot of memory if you have many scripts running.")},r.a.createElement(s.a,null,"Netscript log size")),r.a.createElement(l.a,{value:o,onChange:function(e,t){w(t),_.a.MaxLogCapacity=t},step:1,min:20,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to a port using Netscript's write() function. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Netscript port size")),r.a.createElement(l.a,{value:S,onChange:function(e,t){x(t),_.a.MaxPortCapacity=t},step:1,min:20,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to a the terminal. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Terminal capacity")),r.a.createElement(l.a,{value:O,onChange:function(e,t){T(t),_.a.MaxTerminalCapacity=t},step:50,min:50,max:500,valueLabelDisplay:"auto",marks:!0})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The time (in seconds) between each autosave. Set to 0 to disable autosave.")},r.a.createElement(s.a,null,"Autosave interval (s)")),r.a.createElement(l.a,{value:M,onChange:function(e,t){P(t),_.a.AutosaveInterval=t},step:30,min:0,max:600,valueLabelDisplay:"auto",marks:!0})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:A,onChange:function(e){R(e.target.checked),_.a.SuppressMessages=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then any messages you receive will not appear as popups on the screen. They will still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.")},r.a.createElement(s.a,null,"Suppress messages"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:N,onChange:function(e){I(e.target.checked),_.a.SuppressFactionInvites=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then any faction invites you receive will not appear as popups on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.")},r.a.createElement(s.a,null,"Suppress faction invites"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:j,onChange:function(e){F(e.target.checked),_.a.SuppressTravelConfirmation=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.")},r.a.createElement(s.a,null,"Suppress travel confirmations"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:D,onChange:function(e){B(e.target.checked),_.a.SuppressBuyAugmentationConfirmation=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the confirmation message before buying augmentation will not show up.")},r.a.createElement(s.a,null,"Suppress buy augmentation confirmation"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:L,onChange:function(e){G(e.target.checked),_.a.SuppressHospitalizationPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.")},r.a.createElement(s.a,null,"Suppress hospitalization popup"))})),!!e.player.bladeburner&&r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:W,onChange:function(e){H(e.target.checked),_.a.SuppressBladeburnerPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.")},r.a.createElement(s.a,null,"Suppress bladeburner popup"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:U,onChange:function(e){q(e.target.checked),_.a.DisableHotkeys=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,'If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal commands, hotkeys to navigate between different parts of the game, and the "Save and Close (Ctrl + b)" hotkey in the Text Editor.')},r.a.createElement(s.a,null,"Disable hotkeys"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:K,onChange:function(e){$(e.target.checked),_.a.DisableASCIIArt=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set all ASCII art will be disabled.")},r.a.createElement(s.a,null,"Disable ascii art"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:z,onChange:function(e){Y(e.target.checked),_.a.DisableTextEffects=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.")},r.a.createElement(s.a,null,"Disable text effects"))})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Sets the locale for displaying numbers.")},r.a.createElement(s.a,null,"Locale ")),r.a.createElement(h.a,{value:V,onChange:function(e){J(e.target.value),_.a.Locale=e.target.value}},r.a.createElement(p.a,{value:"en"},"en"),r.a.createElement(p.a,{value:"bg"},"bg"),r.a.createElement(p.a,{value:"cs"},"cs"),r.a.createElement(p.a,{value:"da-dk"},"da-dk"),r.a.createElement(p.a,{value:"de"},"de"),r.a.createElement(p.a,{value:"en-au"},"en-au"),r.a.createElement(p.a,{value:"en-gb"},"en-gb"),r.a.createElement(p.a,{value:"es"},"es"),r.a.createElement(p.a,{value:"fr"},"fr"),r.a.createElement(p.a,{value:"hu"},"hu"),r.a.createElement(p.a,{value:"it"},"it"),r.a.createElement(p.a,{value:"lv"},"lv"),r.a.createElement(p.a,{value:"no"},"no"),r.a.createElement(p.a,{value:"pl"},"pl"),r.a.createElement(p.a,{value:"ru"},"ru")))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",target:"_blank"},r.a.createElement("input",{type:"hidden",name:"cmd",value:"_s-xclick"}),r.a.createElement("input",{type:"hidden",name:"encrypted",value:"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHUVL4U0+ogZsO1s97IAQyfck9SaoFlxVtqQhkb8752MkQJJvGu3ZQSQGcVC4hFDPk8prXqyq4BU/k/EliwoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----"}),r.a.createElement("input",{type:"image",src:"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif",name:"submit",alt:"PayPal - The safer, easier way to pay online!"}))),r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(f.a,null,r.a.createElement(d.a,{onClick:()=>e.save()},"Save Game"),r.a.createElement(d.a,{onClick:()=>ee(!0)},"Delete Game")),r.a.createElement(f.a,null,r.a.createElement(d.a,{onClick:()=>e.export()},"Export Game"),r.a.createElement(d.a,{onClick:()=>e.import()},"Import Game")),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. After using this, save the game and then reload the page. This is different then normal kill in that normal kill will tell the script to shut down while force kill just removes the references to it (and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill all running instance of all scripts.")},r.a.createElement(d.a,{onClick:()=>e.forceKill()},"Force kill all active scripts"))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Perform a soft reset. Resets everything as if you had just purchased an Augmentation.")},r.a.createElement(d.a,{onClick:()=>e.softReset()},"Soft Reset"))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If your save file is extremely big you can use this button to view a map of all the files on every server. Be careful there might be spoilers.")},r.a.createElement(d.a,{onClick:()=>X(!0)},"Diagnose files"))),r.a.createElement(f.a,null,r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/changelog.html",target:"_blank"},r.a.createElement(s.a,null,"Changelog")),r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"},r.a.createElement(s.a,null,"Documentation")),r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/changelog.html",target:"_blank"},r.a.createElement(s.a,null,"Changelog")),r.a.createElement(b.a,{href:"https://discord.gg/TFc3hKD",target:"_blank"},r.a.createElement(s.a,null,"Discord")),r.a.createElement(b.a,{href:"https://www.reddit.com/r/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Reddit"))))),r.a.createElement(v.a,{open:Q,onClose:()=>X(!1)}),r.a.createElement(k.a,{onConfirm:()=>{e.delete(),ee(!1)},open:Z,onClose:()=>ee(!1),confirmationText:"Really delete your game? (It's permanent!)"}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(27),o=a(443),s=a(2),l=a(1023),c=a(1024),u=a(92),m=a(1350),h=a(1351),p=a(179),d=a(30),f=a(286),g=a(155),y=a(156),b=a(157),E=a(72),v=a.n(E);function k(e){const t=i.b[e.ip];let a=0;for(const e of t.scripts)a+=e.code.length;for(const e of t.textFiles)a+=e.text.length;if(0===a)return r.a.createElement(r.a.Fragment,null);const n=[];for(const e of t.scripts)n.push({name:e.filename,size:e.code.length});for(const e of t.textFiles)n.push({name:e.fn,size:e.text.length});return n.sort((e,t)=>t.size-e.size),r.a.createElement(g.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(y.a,{expandIcon:r.a.createElement(v.a,null)},r.a.createElement(d.a,null,t.hostname," (",s.a.formatBigNumber(a),"b)")),r.a.createElement(b.a,null,r.a.createElement(m.a,{component:f.a},r.a.createElement(l.a,null,r.a.createElement(h.a,null,r.a.createElement(p.a,null,r.a.createElement(u.a,null,r.a.createElement(d.a,null,"Filename")),r.a.createElement(u.a,{align:"right"},r.a.createElement(d.a,null,"Size")))),r.a.createElement(c.a,null,n.map(e=>r.a.createElement(p.a,{key:e.name},r.a.createElement(u.a,{component:"th",scope:"row"},r.a.createElement(d.a,null,e.name)),r.a.createElement(u.a,{align:"right"},r.a.createElement(d.a,null,s.a.formatBigNumber(e.size),"b"))))))),r.a.createElement("ul",null)))}function _(e){const t=[];for(const e of Object.keys(i.b))t.push(e);return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,null,"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are."),t.map(e=>r.a.createElement(k,{key:e,ip:e}))))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(443),o=a(48),s=a(30);function l(e){return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,null,e.confirmationText),r.a.createElement(o.a,{onClick:()=>{e.onConfirm()}},"Confirm")))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(931);function o(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,150);return()=>clearInterval(e)},[]),r.a.createElement("div",{style:{width:"70%"}},r.a.createElement("h1",null,"Sleeves"),r.a.createElement("p",null,"Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.",r.a.createElement("br",null),r.a.createElement("br",null),"Sleeves can be used to perform different tasks synchronously.",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"}},"FAQ"),r.a.createElement("a",{className:"std-button",style:{display:"inline-block"},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves"},"Documentation"),r.a.createElement("ul",null,e.player.sleeves.map((t,n)=>r.a.createElement("li",{key:n},r.a.createElement(i.a,{rerender:a,player:e.player,sleeve:t})))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return C}));var n=a(0),r=a.n(n),i=a(56),o=a(5),s=a(60),l=a(2),c=a(9),u=a(140),m=a(17),h=a(932),p=a(933),d=a(934),f=a(11),g=a(167),y=a(377),b=a(935),E=a(936),v=a(937),k=a(938),_=a(124);function C(e){const[t,a]=Object(n.useState)(["------","------","------"]);let C=r.a.createElement(r.a.Fragment,null);switch(e.sleeve.currentTask){case i.a.Idle:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently idle");break;case i.a.Company:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working your job at ",e.sleeve.currentTaskLocation,".");break;case i.a.Faction:{let t="nothing";switch(e.sleeve.factionWorkType){case _.a.Field:t="Field work";break;case _.a.Hacking:t="Hacking contracts";break;case _.a.Security:t="Security work"}C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently doing ",t," for ",e.sleeve.currentTaskLocation,".");break}case i.a.Crime:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently attempting to ",s.a[e.sleeve.crimeType].type," (Success Rate:"," ",l.a.formatPercentage(s.a[e.sleeve.crimeType].successRate(e.sleeve)),").");break;case i.a.Class:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently studying/taking a course at ",e.sleeve.currentTaskLocation,".");break;case i.a.Gym:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working out at ",e.sleeve.currentTaskLocation,".");break;case i.a.Recovery:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.");break;case i.a.Synchro:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.");break;default:console.error("Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): "+t[0])}let w=[];if(e.sleeve.currentTask===i.a.Crime)w=[["Money",r.a.createElement(f.a,{money:parseFloat(e.sleeve.currentTaskLocation)}),"(on success)"],["Hacking Exp",l.a.formatExp(e.sleeve.gainRatesForTask.hack),"(2x on success)"],["Strength Exp",l.a.formatExp(e.sleeve.gainRatesForTask.str),"(2x on success)"],["Defense Exp",l.a.formatExp(e.sleeve.gainRatesForTask.def),"(2x on success)"],["Dexterity Exp",l.a.formatExp(e.sleeve.gainRatesForTask.dex),"(2x on success)"],["Agility Exp",l.a.formatExp(e.sleeve.gainRatesForTask.agi),"(2x on success)"],["Charisma Exp",l.a.formatExp(e.sleeve.gainRatesForTask.cha),"(2x on success)"]];else if(w=[["Money:",Object(g.a)(5*e.sleeve.gainRatesForTask.money)],["Hacking Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.hack)+" / s"],["Strength Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.str)+" / s"],["Defense Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.def)+" / s"],["Dexterity Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.dex)+" / s"],["Agility Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.agi)+" / s"],["Charisma Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.cha)+" / s"]],e.sleeve.currentTask===i.a.Company||e.sleeve.currentTask===i.a.Faction){const t=e.sleeve.getRepGain(e.player);w.push(["Reputation:",Object(y.a)(5*t)])}return r.a.createElement("div",{className:"sleeve-elem"},r.a.createElement("div",{className:"sleeve-panel",style:{width:"25%"}},r.a.createElement("div",{className:"sleeve-stats-text"},r.a.createElement(b.a,{sleeve:e.sleeve}),r.a.createElement("button",{className:"std-button",onClick:function(){Object(c.a)(r.a.createElement(E.a,{sleeve:e.sleeve}))}},"More Stats"),r.a.createElement("button",{className:"std-button"+(e.player.money.lt(o.a.TravelCost)?" tooltip":""),onClick:function(){Object(m.a)("sleeve-travel-popup",p.a,{popupId:"sleeve-travel-popup",sleeve:e.sleeve,player:e.player,rerender:e.rerender})},disabled:e.player.money.lt(o.a.TravelCost)},"Travel",e.player.money.lt(o.a.TravelCost)&&r.a.createElement("span",{className:"tooltiptext"},"Not enough money")),r.a.createElement("button",{className:"std-button"+(e.sleeve.shock<100?" tooltip":""),onClick:function(){Object(m.a)("sleeve-augmentation-popup",h.a,{sleeve:e.sleeve,player:e.player})},style:{display:"block"},disabled:e.sleeve.shock<100},"Manage Augmentations",e.sleeve.shock<100&&r.a.createElement("span",{className:"tooltiptext"},"Unlocked when sleeve has fully recovered")))),r.a.createElement("div",{className:"sleeve-panel",style:{width:"40%"}},r.a.createElement(k.a,{player:e.player,sleeve:e.sleeve,setABC:a}),r.a.createElement("p",null,C),r.a.createElement("p",null,e.sleeve.currentTask===i.a.Crime&&Object(u.a)({progress:e.sleeve.currentTaskTime/e.sleeve.currentTaskMaxTime,totalTicks:25})),r.a.createElement("button",{className:"std-button",onClick:function(){switch(e.sleeve.resetTaskStatus(),t[0]){case"------":break;case"Work for Company":e.sleeve.workForCompany(e.player,t[1]);break;case"Work for Faction":e.sleeve.workForFaction(e.player,t[1],t[2]);break;case"Commit Crime":e.sleeve.commitCrime(e.player,t[1]);break;case"Take University Course":e.sleeve.takeUniversityCourse(e.player,t[2],t[1]);break;case"Workout at Gym":e.sleeve.workoutAtGym(e.player,t[2],t[1]);break;case"Shock Recovery":e.sleeve.shockRecovery(e.player);break;case"Synchronize":e.sleeve.synchronize(e.player);break;default:console.error("Invalid/Unrecognized taskValue in setSleeveTask(): "+t[0])}e.rerender()}},"Set Task")),r.a.createElement("div",{className:"sleeve-panel",style:{width:"35%"}},r.a.createElement(d.a,{title:"Earnings (Pre-Synchronization)",stats:w}),r.a.createElement("button",{className:"std-button",onClick:function(){Object(c.a)(r.a.createElement(v.a,{sleeve:e.sleeve}))}},"More Earnings Info")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(424),o=a(18),s=a(11),l=a(393);function c(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,150);return()=>clearInterval(e)},[]);const c=e.sleeve.augmentations.map(e=>e.name),u=Object(i.a)(e.sleeve,e.player);return r.a.createElement("div",{className:"noselect"},r.a.createElement("p",{style:{display:"block"}},"Owned Augmentations:"),r.a.createElement("div",{style:{width:"70%"}},c.map(e=>{const t=o.a[e];let a=t.info;return"string"!=typeof a&&(a=Object(l.renderToStaticMarkup)(a)),a+="

",a+=Object(l.renderToStaticMarkup)(t.stats),r.a.createElement("div",{key:e,className:"gang-owned-upgrade tooltip"},e,r.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:a}}))})),r.a.createElement("p",null,"You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they would for you. You can only purchase Augmentations that you have unlocked through Factions.",r.a.createElement("br",null),r.a.createElement("br",null),"When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the Duplicate Sleeve will immediately lose all of its stat experience."),u.map(t=>{let n=t.info;return"string"!=typeof n&&(n=Object(l.renderToStaticMarkup)(n)),n+="

",n+=Object(l.renderToStaticMarkup)(t.stats),r.a.createElement("div",{key:t.name,className:"cmpy-mgmt-upgrade-div",onClick:()=>function(t){e.sleeve.tryBuyAugmentation(e.player,t),a()}(t)},r.a.createElement("div",{style:{fontSize:"12px",padding:"2px"}},r.a.createElement("h2",null,t.name),r.a.createElement("br",null),"Cost: ",r.a.createElement(s.a,{money:t.startingCost,player:e.player}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("span",{dangerouslySetInnerHTML:{__html:n}})))}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(5),o=a(17),s=a(11),l=a(334),c=a(9);function u(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. Traveling to a different city costs ",r.a.createElement(s.a,{money:i.a.TravelCost,player:e.player}),". It will also set your current sleeve task to idle."),r.a.createElement(l.a,{currentCity:e.sleeve.city,onTravel:t=>function(t){e.player.canAfford(i.a.TravelCost)||Object(c.a)("You cannot afford to have this sleeve travel to another city"),e.sleeve.city=t,e.player.loseMoney(i.a.TravelCost),e.sleeve.resetTaskStatus(),Object(o.b)(e.popupId),e.rerender()}(t)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);function r(e){return n.createElement(n.Fragment,null,n.createElement("pre",null,e.title),n.createElement("table",null,n.createElement("tbody",null,e.stats.map((e,t)=>n.createElement("tr",{key:t},e.map((e,t)=>{let a={};return 0!==t&&(a={textAlign:"right"}),n.createElement("td",{style:a,key:t},e)}))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(0);function i(e){let t={};return t={textAlign:"right"},r.createElement(r.Fragment,null,r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{className:"character-hp-cell"},"HP: "),r.createElement("td",{className:"character-hp-cell",style:t},n.a.formatHp(e.sleeve.hp)," / ",n.a.formatHp(e.sleeve.max_hp))),r.createElement("tr",null,r.createElement("td",null,"City: "),r.createElement("td",{style:t},e.sleeve.city)),r.createElement("tr",null,r.createElement("td",{className:"character-hack-cell"},"Hacking: "),r.createElement("td",{className:"character-hack-cell",style:t},n.a.formatSkill(e.sleeve.hacking_skill))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Strength: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.strength))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Defense: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.defense))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Dexterity: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.dexterity))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Agility: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.agility))),r.createElement("tr",null,r.createElement("td",{className:"character-cha-cell"},"Charisma: "),r.createElement("td",{className:"character-cha-cell",style:t},n.a.formatSkill(e.sleeve.charisma))),r.createElement("tr",null,r.createElement("td",{className:"character-int-cell"},"Shock: "),r.createElement("td",{className:"character-int-cell",style:t},n.a.formatSleeveShock(100-e.sleeve.shock))),r.createElement("tr",null,r.createElement("td",{className:"character-int-cell"},"Sync: "),r.createElement("td",{className:"character-int-cell",style:t},n.a.formatSleeveSynchro(e.sleeve.sync))),r.createElement("tr",null,r.createElement("td",{className:"character-int-cell"},"Memory: "),r.createElement("td",{className:"character-int-cell",style:t},n.a.formatSleeveMemory(e.sleeve.memory))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(2),r=a(184),i=a(0);function o(e){return i.createElement(i.Fragment,null,Object(r.a)([["Hacking: ",e.sleeve.hacking_skill,`(${n.a.formatExp(e.sleeve.hacking_exp)} exp)`],["Strength: ",e.sleeve.strength,`(${n.a.formatExp(e.sleeve.strength_exp)} exp)`],["Defense: ",e.sleeve.defense,`(${n.a.formatExp(e.sleeve.defense_exp)} exp)`],["Dexterity: ",e.sleeve.dexterity,`(${n.a.formatExp(e.sleeve.dexterity_exp)} exp)`],["Agility: ",e.sleeve.agility,`(${n.a.formatExp(e.sleeve.agility_exp)} exp)`],["Charisma: ",e.sleeve.charisma,`(${n.a.formatExp(e.sleeve.charisma_exp)} exp)`]],"Stats:"),i.createElement("br",null),Object(r.a)([["Hacking Level multiplier: ",n.a.formatPercentage(e.sleeve.hacking_mult)],["Hacking Experience multiplier: ",n.a.formatPercentage(e.sleeve.hacking_exp_mult)],["Strength Level multiplier: ",n.a.formatPercentage(e.sleeve.strength_mult)],["Strength Experience multiplier: ",n.a.formatPercentage(e.sleeve.strength_exp_mult)],["Defense Level multiplier: ",n.a.formatPercentage(e.sleeve.defense_mult)],["Defense Experience multiplier: ",n.a.formatPercentage(e.sleeve.defense_exp_mult)],["Dexterity Level multiplier: ",n.a.formatPercentage(e.sleeve.dexterity_mult)],["Dexterity Experience multiplier: ",n.a.formatPercentage(e.sleeve.dexterity_exp_mult)],["Agility Level multiplier: ",n.a.formatPercentage(e.sleeve.agility_mult)],["Agility Experience multiplier: ",n.a.formatPercentage(e.sleeve.agility_exp_mult)],["Charisma Level multiplier: ",n.a.formatPercentage(e.sleeve.charisma_mult)],["Charisma Experience multiplier: ",n.a.formatPercentage(e.sleeve.charisma_exp_mult)],["Faction Reputation Gain multiplier: ",n.a.formatPercentage(e.sleeve.faction_rep_mult)],["Company Reputation Gain multiplier: ",n.a.formatPercentage(e.sleeve.company_rep_mult)],["Salary multiplier: ",n.a.formatPercentage(e.sleeve.work_money_mult)],["Crime Money multiplier: ",n.a.formatPercentage(e.sleeve.crime_money_mult)],["Crime Success multiplier: ",n.a.formatPercentage(e.sleeve.crime_success_mult)]],"Multipliers:"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(2),r=a(11),i=a(0),o=a(184);function s(e){return i.createElement(i.Fragment,null,Object(o.a)([["Money ",i.createElement(r.a,{money:e.sleeve.earningsForTask.money})],["Hacking Exp ",n.a.formatExp(e.sleeve.earningsForTask.hack)],["Strength Exp ",n.a.formatExp(e.sleeve.earningsForTask.str)],["Defense Exp ",n.a.formatExp(e.sleeve.earningsForTask.def)],["Dexterity Exp ",n.a.formatExp(e.sleeve.earningsForTask.dex)],["Agility Exp ",n.a.formatExp(e.sleeve.earningsForTask.agi)],["Charisma Exp ",n.a.formatExp(e.sleeve.earningsForTask.cha)]],"Earnings for Current Task:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.sleeve.earningsForPlayer.money})],["Hacking Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.hack)],["Strength Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.str)],["Defense Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.def)],["Dexterity Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.dex)],["Agility Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.agi)],["Charisma Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.cha)]],"Total Earnings for Host Consciousness:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.sleeve.earningsForSleeves.money})],["Hacking Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.hack)],["Strength Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.str)],["Defense Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.def)],["Dexterity Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.dex)],["Agility Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.agi)],["Charisma Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.cha)]],"Total Earnings for Other Sleeves:"),i.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(56),o=a(60),s=a(7),l=a(21),c=a(24),u=a(124);const m=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],h=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function p(e,t){const a=[];for(const n of e.sleeves)t!==n&&n.currentTask===i.a.Company&&a.push(n.currentTaskLocation);const n=Object.keys(e.jobs);for(let e=0;e({first:["------"],second:()=>["------"]}),"Work for Company":(e,t)=>{let a=p(e,t);return 0===a.length&&(a=["------"]),{first:a,second:()=>["------"]}},"Work for Faction":(e,t)=>{let a=d(e,t);return 0===a.length&&(a=["------"]),{first:a,second:e=>{const t=c.a[e].getInfo(),a=[];return t.offerHackingWork&&a.push("Hacking Contracts"),t.offerFieldWork&&a.push("Field Work"),t.offerSecurityWork&&a.push("Security Work"),a}}},"Commit Crime":()=>({first:Object.keys(o.a),second:()=>["------"]}),"Take University Course":(e,t)=>{let a=[];switch(t.city){case l.a.Aevum:a=[s.a.AevumSummitUniversity];break;case l.a.Sector12:a=[s.a.Sector12RothmanUniversity];break;case l.a.Volhaven:a=[s.a.VolhavenZBInstituteOfTechnology];break;default:a=["No university available in city!"]}return{first:m,second:()=>a}},"Workout at Gym":(e,t)=>{let a=[];switch(t.city){case l.a.Aevum:a=[s.a.AevumCrushFitnessGym,s.a.AevumSnapFitnessGym];break;case l.a.Sector12:a=[s.a.Sector12IronGym,s.a.Sector12PowerhouseGym];break;case l.a.Volhaven:a=[s.a.VolhavenMilleniumFitnessGym];break;default:a=["No gym available in city!"]}return{first:h,second:()=>a}},"Shock Recovery":()=>({first:["------"],second:()=>["------"]}),Synchronize:()=>({first:["------"],second:()=>["------"]})},g={"------":()=>!0,"Work for Company":(e,t)=>p(e,t).length>0,"Work for Faction":(e,t)=>d(e,t).length>0,"Commit Crime":()=>!0,"Take University Course":(e,t)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(t.city),"Workout at Gym":(e,t)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(t.city),"Shock Recovery":(e,t)=>t.shock<100,Synchronize:(e,t)=>t.sync<100};function y(e){const t=function(e){switch(e.currentTask){case i.a.Idle:return["------","------","------"];case i.a.Company:return["Work for Company",e.currentTaskLocation,"------"];case i.a.Faction:{let t="";switch(e.factionWorkType){case u.a.Hacking:t="Hacking Contracts";break;case u.a.Field:t="Field Work";break;case u.a.Security:t="Security Work"}return["Work for Faction",e.currentTaskLocation,t]}case i.a.Crime:return["Commit Crime",e.crimeType,"------"];case i.a.Class:return["Take University Course",e.className,e.currentTaskLocation];case i.a.Gym:return["Workout at Gym",e.gymStatType,e.currentTaskLocation];case i.a.Recovery:return["Shock Recovery","------","------"];case i.a.Synchro:return["Synchronize","------","------"]}}(e.sleeve),[a,o]=Object(n.useState)(t[0]),[s,l]=Object(n.useState)(t[1]),[c,m]=Object(n.useState)(t[2]),h=Object.keys(g).filter(t=>g[t](e.player,e.sleeve)),p=f[a];if(void 0===p)throw new Error(`No function for task '${a}'`);const d=p(e.player,e.sleeve),y=d.second(s);return d.first.length>0&&!d.first.includes(s)&&(l(d.first[0]),e.setABC([a,d.first[0],c])),y.length>0&&!y.includes(c)&&(m(y[0]),e.setABC([a,s,y[0]])),r.a.createElement(r.a.Fragment,null,r.a.createElement("select",{className:"dropdown",onChange:function(t){const n=t.target.value,r=f[n];if(void 0===r)throw new Error(`No function for task '${a}'`);const i=r(e.player,e.sleeve),s=i.second(i.first[0]);m(s[0]),l(i.first[0]),o(n),e.setABC([n,i.first[0],s[0]])},defaultValue:a},h.map(e=>r.a.createElement("option",{key:e,value:e},e))),!(1===d.first.length&&"------"===d.first[0])&&r.a.createElement("select",{className:"dropdown",onChange:function(t){l(t.target.value),e.setABC([a,t.target.value,c])},defaultValue:s},d.first.map(e=>r.a.createElement("option",{key:e,value:e},e))),!(1===y.length&&"------"===y[0])&&r.a.createElement("select",{className:"dropdown",onChange:function(t){m(t.target.value),e.setABC([a,s,t.target.value])},defaultValue:c},y.map(e=>r.a.createElement("option",{key:e,value:e},e))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(46),r=a(940),i=a(0),o=a(52);let s;function l(e,t,a,l,c){if(!n.b.isOn(n.a.Infiltration))return;const u=function(e,t){const a=e.strength+e.defense+e.dexterity+e.agility+e.charisma,n=t-Math.pow(a,.9)/250-e.intelligence/1600;return n<0?0:n>3?3:n}(t,l);o.render(i.createElement(r.a,{Engine:e,Player:t,Location:a,StartingDifficulty:l,Difficulty:u,MaxLevel:c}),s)}document.addEventListener("DOMContentLoaded",(function e(){const t=document.getElementById("infiltration-container");if(null===t)throw new Error("huh?");s=t,document.removeEventListener("DOMContentLoaded",e)}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(941),o=a(942);function s(e){const[t,a]=Object(n.useState)(!1);return t?r.a.createElement(o.a,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel}):r.a.createElement(i.a,{Player:e.Player,Engine:e.Engine,Location:e.Location,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel,start:()=>a(!0),cancel:function(){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(22),o=a(70);function s(e,t){let a="";return t<=0?t=0:t>13?t=13:(t--,a=">"),r.a.createElement("span",{style:{color:e}},"=".repeat(t),a," ".repeat(13-a.length-t))}function l(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{container:!0,spacing:3},r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("h1",null,"Infiltrating ",e.Location)),r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("h2",null,"Maximum level: ",e.MaxLevel)),r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("pre",null,"[",0===(t=e.Difficulty)?r.a.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.a.createElement(r.a.Fragment,null,s("white",13*t),s("orange",13*(t-1)),s("red",13*(t-2))),"]"),r.a.createElement("pre",null," ^ ^ ^ ^"),r.a.createElement("pre",null," Trivial Normal Hard Impossible")),r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("p",null,"Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation."),r.a.createElement("br",null),r.a.createElement("p",null,"The minigames you play are randomly selected. It might take you few tries to get used to them."),r.a.createElement("br",null),r.a.createElement("p",null,"No game require use of the mouse."),r.a.createElement("br",null),r.a.createElement("p",null,"Spacebar is the default action/confirm button."),r.a.createElement("br",null),r.a.createElement("p",null,"Everything that uses arrow can also use WASD"),r.a.createElement("br",null),r.a.createElement("p",null,"Sometimes the rest of the keyboard is used.")),r.a.createElement(o.a,{item:!0,xs:3},r.a.createElement(i.a,{onClick:e.start,text:"Start"})),r.a.createElement(o.a,{item:!0,xs:3},r.a.createElement(i.a,{onClick:e.cancel,text:"Cancel"}))));var t}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n,r=a(0),i=a.n(r),o=a(70),s=a(943),l=a(944),c=a(946),u=a(947),m=a(948),h=a(949),p=a(950),d=a(951),f=a(952),g=a(953);!function(e){e[e.Countdown=0]="Countdown",e[e.Minigame=1]="Minigame",e[e.Result=2]="Result",e[e.Sell=3]="Sell"}(n||(n={}));const y=[c.a,l.a,u.a,m.a,h.a,p.a,d.a,f.a];function b(e){const[t,a]=Object(r.useState)(1),[l,c]=Object(r.useState)(n.Countdown),[u,m]=Object(r.useState)(""),[h,p]=Object(r.useState)({lastGames:[-1,-1],id:Math.floor(Math.random()*y.length)});function d(){let e=h.lastGames[0];const t=[h.lastGames[0],h.lastGames[1],h.id];for(;t.includes(e);)e=Math.floor(Math.random()*y.length);return e}function f(){p({lastGames:[h.lastGames[1],h.id],id:d()})}function b(e){m(t=>{let a=t;return a+=e?"✓":"✗",a.length>15&&(a=a.slice(1)),a})}let E;switch(l){case n.Countdown:E=i.a.createElement(s.a,{onFinish:()=>c(n.Minigame)});break;case n.Minigame:{const r=y[h.id];E=i.a.createElement(r,{onSuccess:function(){b(!0),t===e.MaxLevel?c(n.Sell):(c(n.Countdown),a(t+1)),f()},onFailure:function(t){c(n.Countdown),b(!1);const a=null!=t&&t.automated?e.Player.hp:3*e.StartingDifficulty;if(e.Player.takeDamage(a)){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}f()},difficulty:e.Difficulty+t/50});break}case n.Sell:E=i.a.createElement(g.a,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel})}return i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{container:!0,spacing:3},i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement("h3",null,"Level: ",t," / ",e.MaxLevel),i.a.createElement((function(){return i.a.createElement("h4",null,i.a.createElement("span",{style:{color:"gray"}},u.slice(0,u.length-1)),u[u.length-1])}),null)),i.a.createElement(o.a,{item:!0,xs:12},E)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(70);function o(e){const[t,a]=Object(n.useState)(3);return Object(n.useEffect)(()=>{0!==t?setTimeout(()=>a(t-1),200):e.onFinish()}),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",null,"Get Ready!"),r.a.createElement("h1",null,t))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(193),c=a(145),u=a(444);const m={Trivial:{timer:8e3,min:2,max:3},Normal:{timer:6e3,min:4,max:5},Hard:{timer:4e3,min:4,max:6},Impossible:{timer:2500,min:7,max:7}};function h(e){const t={timer:0,min:0,max:0};Object(c.a)(m,e.difficulty,t);const a=t.timer,[h,p]=Object(n.useState)(""),[d]=Object(n.useState)(function(e){let t="";const a=Object(l.b)(e.min,e.max);for(let e=0;e":"":"]"}(t);a&&(!function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(d[d.length-h.length-1],a)?e.onFailure():d.length!==h.length+1?p(h+a):e.onSuccess())},onFailure:e.onFailure})))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(145);const c={Trivial:{window:600},Normal:{window:325},Hard:{window:250},Impossible:{window:150}};function u(e){const t={window:0};Object(l.a)(c,e.difficulty,t);const[a,u]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{let e=-1;const a=window.setTimeout(()=>{u(!1),e=window.setTimeout(()=>u(!0),t.window)},3250*Math.random()+1500);return()=>{clearInterval(a),-1!==e&&clearInterval(e)}},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:5e3,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Slash when his guard is down!"),r.a.createElement("p",{style:{fontSize:"5em"}},a?"!Guarding!":"!ATTACKING!"),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault(),32===t.keyCode&&(a?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(193),c=a(145),u=a(444);const m={Trivial:{timer:16e3,min:3,max:4},Normal:{timer:12500,min:2,max:3},Hard:{timer:15e3,min:3,max:4},Impossible:{timer:8e3,min:4,max:4}};function h(e){const t={timer:0,min:0,max:0};Object(c.a)(m,e.difficulty,t);const a=t.timer,[h]=Object(n.useState)(function(e){const t=Object(l.b)(e.min,e.max);let a="";for(let e=0;e0&&(a+=" "),a+=p[Math.floor(Math.random()*p.length)];return a}(t)),[d,f]=Object(n.useState)("");return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Type it backward"),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),16===t.keyCode)return;const a=d+t.key.toUpperCase();h.startsWith(a)?h===a?e.onSuccess():f(a):e.onFailure()},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement("p",{style:{transform:"scaleX(-1)"}},h)),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement("p",null,d,r.a.createElement(u.a,null))))}const p=["ALGORITHM","ANALOG","APP","APPLICATION","ARRAY","BACKUP","BANDWIDTH","BINARY","BIT","BITE","BITMAP","BLOG","BLOGGER","BOOKMARK","BOOT","BROADBAND","BROWSER","BUFFER","BUG","BUS","BYTE","CACHE","CAPS LOCK","CAPTCHA","CD","CD-ROM","CLIENT","CLIPBOARD","CLOUD","COMPUTING","COMMAND","COMPILE","COMPRESS","COMPUTER","CONFIGURE","COOKIE","COPY","CPU","CYBERCRIME","CYBERSPACE","DASHBOARD","DATA","MINING","DATABASE","DEBUG","DECOMPRESS","DELETE","DESKTOP","DEVELOPMENT","DIGITAL","DISK","DNS","DOCUMENT","DOMAIN","DOMAIN NAME","DOT","DOT MATRIX","DOWNLOAD","DRAG","DVD","DYNAMIC","EMAIL","EMOTICON","ENCRYPT","ENCRYPTION","ENTER","EXABYTE","FAQ","FILE","FINDER","FIREWALL","FIRMWARE","FLAMING","FLASH","FLASH DRIVE","FLOPPY DISK","FLOWCHART","FOLDER","FONT","FORMAT","FRAME","FREEWARE","GIGABYTE","GRAPHICS","HACK","HACKER","HARDWARE","HOME PAGE","HOST","HTML","HYPERLINK","HYPERTEXT","ICON","INBOX","INTEGER","INTERFACE","INTERNET","IP ADDRESS","ITERATION","JAVA","JOYSTICK","JUNKMAIL","KERNEL","KEY","KEYBOARD","KEYWORD","LAPTOP","LASER PRINTER","LINK","LINUX","LOG OUT","LOGIC","LOGIN","LURKING","MACINTOSH","MACRO","MAINFRAME","MALWARE","MEDIA","MEMORY","MIRROR","MODEM","MONITOR","MOTHERBOARD","MOUSE","MULTIMEDIA","NET","NETWORK","NODE","NOTEBOOK","COMPUTER","OFFLINE","ONLINE","OPENSOURCE","OPERATING","SYSTEM","OPTION","OUTPUT","PAGE","PASSWORD","PASTE","PATH","PHISHING","PIRACY","PIRATE","PLATFORM","PLUGIN","PODCAST","POPUP","PORTAL","PRINT","PRINTER","PRIVACY","PROCESS","PROGRAM","PROGRAMMER","PROTOCOL","QUEUE","QWERTY","RAM","REALTIME","REBOOT","RESOLUTION","RESTORE","ROM","ROOT","ROUTER","RUNTIME","SAVE","SCAN","SCANNER","SCREEN","SCREENSHOT","SCRIPT","SCROLL","SCROLL","SEARCH","ENGINE","SECURITY","SERVER","SHAREWARE","SHELL","SHIFT","SHIFT KEY","SNAPSHOT","SOCIAL NETWORKING","SOFTWARE","SPAM","SPAMMER","SPREADSHEET","SPYWARE","STATUS","STORAGE","SUPERCOMPUTER","SURF","SYNTAX","TABLE","TAG","TERMINAL","TEMPLATE","TERABYTE","TEXT EDITOR","THREAD","TOOLBAR","TRASH","TROJAN HORSE","TYPEFACE","UNDO","UNIX","UPLOAD","URL","USER","USER INTERFACE","USERNAME","UTILITY","VERSION","VIRTUAL","VIRTUAL MEMORY","VIRUS","WEB","WEBMASTER","WEBSITE","WIDGET","WIKI","WINDOW","WINDOWS","WIRELESS","PROCESSOR","WORKSTATION","WEB","WORM","WWW","XML","ZIP"]},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(145);const c={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};function u(e){const t={timer:0,size:0};Object(l.a)(c,e.difficulty,t);const a=t.timer,[u]=Object(n.useState)(function(e){const t=[];t.push(m[Math.floor(Math.random()*m.length)]);for(let a=0;a0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[a],e[a]=n}}(t),t}(t)),[p,d]=Object(n.useState)(0);return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",null,"Say something nice about the guard."),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=t.keyCode;if(32===a)return void(m.includes(u[p])?e.onSuccess():e.onFailure());let n=p;for([38,87,68,39].includes(a)&&n++,[65,37,83,40].includes(a)&&n--;n<0;)n+=u.length;for(;n>u.length-1;)n-=u.length;d(n)},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement("h2",{style:{fontSize:"2em"}},"↑"),r.a.createElement("h2",{style:{fontSize:"2em"}},u[p]),r.a.createElement("h2",{style:{fontSize:"2em"}},"↓")))}const m=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],h=["aggressive","aloof","arrogant","big-headed","boastful","boring","bossy","careless","clingy","couch potato","cruel","cynical","grumpy","hot air","know it all","obnoxious","pain in the neck","picky","tactless","thoughtless"]},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(193),c=a(145);const u={Trivial:{timer:13e3,min:6,max:8},Normal:{timer:7e3,min:7,max:8},Hard:{timer:5e3,min:8,max:9},Impossible:{timer:3e3,min:9,max:10}};function m(e){const t={timer:0,min:0,max:0};Object(c.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=["←","→","↑","↓"];let a="";for(let n=0;n=m.length&&e.onSuccess()):e.onFailure()},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(145),c=a(193);const u={Trivial:{timer:12500,width:3,height:3,symbols:6},Normal:{timer:15e3,width:4,height:4,symbols:7},Hard:{timer:12500,width:5,height:5,symbols:8},Impossible:{timer:1e4,width:6,height:6,symbols:9}};function m(e){const t={timer:0,width:0,height:0,symbols:0};Object(l.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=[];for(let a=0;at==d?r.a.createElement("span",{key:""+t,style:{fontSize:"1em",color:"blue"}},e," "):r.a.createElement("span",{key:""+t,style:{fontSize:"1em"}},e," "))),r.a.createElement("br",null),m.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("pre",null,e.map((e,a)=>a==g[0]&&t==g[1]?r.a.createElement("span",{key:`${a}${t}`,style:{fontSize:"2em",color:"blue"}},e," "):r.a.createElement("span",{key:`${a}${t}`,style:{fontSize:"2em"}},e," "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=[0,0];switch(Object(c.a)(t)){case"↑":a[1]--;break;case"←":a[0]--;break;case"↓":a[1]++;break;case"→":a[0]++}const n=[g[0]+a[0],g[1]+a[1]];if(n[0]=(n[0]+m[0].length)%m[0].length,n[1]=(n[1]+m.length)%m.length,y(n),32==t.keyCode){if(m[g[1]][g[0]]!==p[d])return void e.onFailure();f(d+1),p.length===d+1&&e.onSuccess()}},onFailure:e.onFailure})))}function h(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(145),c=a(193);const u={Trivial:{timer:15e3,width:3,height:3,mines:4},Normal:{timer:15e3,width:4,height:4,mines:7},Hard:{timer:15e3,width:5,height:5,mines:11},Impossible:{timer:15e3,width:6,height:6,mines:15}};function m(e){const t={timer:0,width:0,height:0,mines:0};Object(l.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=h(e);for(let a=0;a{const e=setTimeout(()=>b(!1),2e3);return()=>clearInterval(e)},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},y?"Remember all the mines!":"Mark all the mines!"),m.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("pre",null,e.map((e,a)=>y?m[t][a]?r.a.createElement("span",{key:a},"[?] "):r.a.createElement("span",{key:a},"[ ] "):a==f[0]&&t==f[1]?r.a.createElement("span",{key:a},"[X] "):p[t][a]?r.a.createElement("span",{key:a},"[.] "):r.a.createElement("span",{key:a},"[ ] "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),y)return;const a=[0,0];switch(Object(c.a)(t)){case"↑":a[1]--;break;case"←":a[0]--;break;case"↓":a[1]++;break;case"→":a[0]++}const n=[f[0]+a[0],f[1]+a[1]];if(n[0]=(n[0]+m[0].length)%m[0].length,n[1]=(n[1]+m.length)%m.length,g(n),32==t.keyCode){if(!m[f[1]][f[0]])return void e.onFailure();d(t=>(t[f[1]][f[0]]=!0,function(e,t){function a(e){return e.flat().reduce((e,t)=>e+(t?1:0),0)}return a(e)===a(t)}(m,t)&&e.onSuccess(),t))}},onFailure:e.onFailure})))}function h(e){const t=[];for(let a=0;ar.a.createElement("h3",{key:t},e.toString())),r.a.createElement("pre",null,new Array(p.length).fill(0).map((e,t)=>r.a.createElement("span",{key:t}," ",t+1,"    "))),new Array(8).fill(0).map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("pre",null,p.map((e,a)=>3!==t&&4!==t||!d[a]?r.a.createElement("span",{key:a,style:{color:e.colors[t%e.colors.length]}},"|",e.tpe,"|   "):r.a.createElement("span",{key:a},"      "))))),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=parseInt(t.key);a<1||a>p.length||isNaN(a)||y(t=>{const n=[...t];n[a-1]=!0,b.some(e=>e.shouldCut(p[a-1],a-1))||e.onFailure();const r=[];for(let e=0;ee===n[t])&&e.onSuccess(),n})},onFailure:e.onFailure})))}function f(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,a)=>t===a}}function g(e){const t=e[Math.floor(Math.random()*e.length)].colors[0];return{toString:()=>`Cut all wires colored ${p[t]}.`,shouldCut:e=>e.colors.includes(t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(24),r=a(0),i=a.n(r),o=a(22),s=a(70),l=a(11),c=a(75),u=a(6);function m(e){const[t,a]=Object(r.useState)("none");function m(){const t=document.getElementById("mainmenu-container");if(!t)throw new Error("mainmenu-container somehow null");t.style.visibility="visible",e.Engine.loadLocationContent()}const h=e.MaxLevel*Math.pow(1.01,e.MaxLevel),p=Math.pow(e.Difficulty+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*h*u.a.InfiltrationRep,d=Math.pow(e.Difficulty+1,2)*Math.pow(e.StartingDifficulty,3)*3e3*h*u.a.InfiltrationMoney;return i.a.createElement(i.a.Fragment,null,i.a.createElement(s.a,{container:!0,spacing:3},i.a.createElement(s.a,{item:!0,xs:10},i.a.createElement("h1",null,"Infiltration successful!")),i.a.createElement(s.a,{item:!0,xs:10},i.a.createElement("h2",null,"You can trade the confidential information you found for money or reputation."),i.a.createElement("select",{className:"dropdown",onChange:function(e){a(e.target.value)}},i.a.createElement("option",{key:"none",value:"none"},"none"),e.Player.factions.filter(e=>n.a[e].getInfo().offersWork()).map(e=>i.a.createElement("option",{key:e,value:e},e))),i.a.createElement(o.a,{onClick:function(){"none"!==t&&(n.a[t].playerReputation+=p,m())},text:i.a.createElement(i.a.Fragment,null,"Trade for ",Object(c.a)(p)," reputation")})),i.a.createElement(s.a,{item:!0,xs:3},i.a.createElement(o.a,{onClick:function(){e.Player.gainMoney(d),e.Player.recordMoneySource(d,"infiltration"),m()},text:i.a.createElement(i.a.Fragment,null,"Sell for ",i.a.createElement(l.a,{money:d}))})),i.a.createElement(s.a,{item:!0,xs:3},i.a.createElement(o.a,{onClick:m,text:"Quit"}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(955),o=a(956),s=a(957),l=a(241),c=a(958),u=a(960),m=a(961),h=a(962),p=a(28),d=a(45),f=a(27),g=a(90),y=a(17);function b(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[b,E]=Object(n.useState)(p.c.x1);Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]);let v,k=0;for(let t=0;tE(p.c.x1),()=>E(p.c.x5),()=>E(p.c.x10),()=>E(p.c.MAX)],C=e.player.hacknetNodes.map(t=>{if(Object(d.g)(e.player)){if(t instanceof l.a)throw new Error("node was hacknet node");const n=f.b[t];if(null==n)throw new Error("Could not find Hacknet Server object in AllServers map for IP: "+t);if(n instanceof g.a)throw new Error("node was normal server");return r.a.createElement(s.a,{player:e.player,key:n.hostname,node:n,purchaseMultiplier:b,rerender:a})}if("string"==typeof t)throw new Error("node was ip string");return r.a.createElement(o.a,{player:e.player,key:t.name,node:t,purchaseMultiplier:b,rerender:a})});return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"Hacknet ",Object(d.g)(e.player)?"Servers":"Nodes"),r.a.createElement(i.a,{hasHacknetServers:Object(d.g)(e.player)}),r.a.createElement(h.a,{cost:v,multiplier:b,onClick:function(){Object(d.l)(e.player),a()}}),r.a.createElement("br",null),r.a.createElement("div",{id:"hacknet-nodes-money-multipliers-div"},r.a.createElement(m.a,{totalProduction:k,player:e.player}),r.a.createElement(u.a,{onClicks:_,purchaseMultiplier:b})),Object(d.g)(e.player)&&r.a.createElement("button",{className:"std-button",onClick:function(){Object(y.a)("hacknet-server-hash-upgrades-popup",c.a,{player:e.player})},style:{display:"block"}},"Spend Hashes on Upgrades"),r.a.createElement("ul",{id:"hacknet-nodes-list"},C))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){return r.a.createElement("div",null,r.a.createElement("p",{className:"hacknet-general-info"},"The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to anonymously share computing power and perform distributed cyberattacks without the fear of being traced."),e.hasHacknetServers?r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"hacknet-general-info"},"Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers will perform computations and operations on the network, earning you hashes. Hashes can be spent on a variety of different upgrades."),r.a.createElement("p",{className:"hacknet-general-info"},"Hacknet Servers can also be used as servers to run scripts. However, running scripts on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash rate will be reduced by the percentage of RAM that is being used by that Server to run scripts.")):r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"hacknet-general-info"},"Here, you can purchase a Hacknet Node, a specialized machine that can connect and contribute its resources to the Hacknet network. This allows you to take a small percentage of profits from hacks performed on the network. Essentially, you are renting out your Node's computing power."),r.a.createElement("p",{className:"hacknet-general-info"},"Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node can be upgraded in order to increase its computing power and thereby increase the profit you earn from it.")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(28),o=a(45),s=a(11),l=a(167);function c(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let c,u,m,h,p,d;if(t.level>=i.a.MaxLevel)c=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),u="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.a.MaxLevel);else{const e=i.a.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);c=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),u=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.ram>=i.a.MaxRam)m=r.a.createElement(r.a.Fragment,null,"MAX RAM"),h="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.a.MaxRam);else{const e=Math.round(Math.log2(i.a.MaxRam/t.ram));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);m=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),h=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.cores>=i.a.MaxCores)p=r.a.createElement(r.a.Fragment,null,"MAX CORES"),d="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.a.MaxCores);else{const e=i.a.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);p=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),d=e.player.money.lt(l)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},t.name)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},r.a.createElement(s.a,{money:t.totalMoneyGenerated,player:e.player})," (",Object(l.a)(t.moneyGainRatePerSecond),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},t.level),r.a.createElement("button",{className:u,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.e)(e.player,t,i.a.MaxLevel)),Object(o.n)(e.player,t,r),n()}},c)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},t.ram,"GB"),r.a.createElement("button",{className:h,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.f)(e.player,t,i.a.MaxRam)),Object(o.o)(e.player,t,r),n()}},m)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},t.cores),r.a.createElement("button",{className:d,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.d)(e.player,t,i.a.MaxCores)),Object(o.k)(e.player,t,r),n()}},p))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(28),o=a(45),s=a(11),l=a(183),c=a(445);function u(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let u,m,h,p,d,f,g,y;if(t.level>=i.b.MaxLevel)u=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),m="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.b.MaxLevel);else{const e=i.b.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);u=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),m=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.maxRam>=i.b.MaxRam)h=r.a.createElement(r.a.Fragment,null,"MAX RAM"),p="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.b.MaxRam);else{const e=Math.round(Math.log2(i.b.MaxRam/t.maxRam));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);h=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),p=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.cores>=i.b.MaxCores)d=r.a.createElement(r.a.Fragment,null,"MAX CORES"),f="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.b.MaxCores);else{const e=i.b.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);d=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),f=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.cache>=i.b.MaxCache)g=r.a.createElement(r.a.Fragment,null,"MAX CACHE"),y="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.c)(e.player,t,i.b.MaxCache);else{const e=i.b.MaxCache-t.cache;n=Math.min(e,a)}const l=t.calculateCacheUpgradeCost(n);g=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),y=e.player.money.lt(l)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},t.hostname)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(l.a)(t.totalHashesGenerated)," (",Object(c.a)(t.hashRate),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Hash Capacity:"),r.a.createElement("span",{className:"text"},Object(l.a)(t.hashCapacity))),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},t.level),r.a.createElement("button",{className:m,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.e)(e.player,t,i.b.MaxLevel)),Object(o.n)(e.player,t,r),n()}},u)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},t.maxRam,"GB"),r.a.createElement("button",{className:p,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.f)(e.player,t,i.b.MaxRam)),Object(o.o)(e.player,t,r),n()}},h)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},t.cores),r.a.createElement("button",{className:f,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.d)(e.player,t,i.b.MaxCores)),Object(o.k)(e.player,t,r),n()}},d)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cache Level:"),r.a.createElement("span",{className:"text upgradable-info"},t.cache),r.a.createElement("button",{className:y,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.c)(e.player,t,i.b.MaxCache)),Object(o.j)(e.player,t,r),n(),Object(o.p)(e.player)}},g))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(273),o=a(210),s=a(183),l=a(959);function c(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]);const c=e.player.hashManager;if(!(c instanceof i.a))throw new Error("Player does not have a HashManager)");const u=Object.keys(o.a).map(t=>{const n=o.a[t];return r.a.createElement(l.a,{player:e.player,upg:n,hashManager:c,key:n.name,rerender:a})});return r.a.createElement("div",null,r.a.createElement("p",null,"Spend your hashes on a variety of different upgrades"),r.a.createElement("p",null,"Hashes: ",Object(s.a)(e.player.hashManager.hashes)),u)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(45),o=a(534),s=a(9),l=a(121),c=a(183);function u(e){const[t,a]=Object(n.useState)("ecorp");const u=e.hashManager,m=e.upg,h=u.getUpgradeCost(m.name),p=u.upgrades[m.name],d=m.effectText(p),f=u.hashes>=h?"std-button":"std-button-disabled";return r.a.createElement("div",{className:"bladeburner-action"},r.a.createElement(l.b,{value:m.name}),r.a.createElement("p",null,"Cost: ",Object(c.a)(h),", Bought: ",p," times"),r.a.createElement("p",null,m.desc),r.a.createElement("button",{className:f,onClick:function(){if(e.hashManager.hashes>=e.hashManager.getUpgradeCost(e.upg.name)){Object(i.m)(e.player,e.upg.name,t)||Object(s.a)("Failed to purchase upgrade. This may be because you do not have enough hashes, or because you do not have access to the feature upgrade affects."),e.rerender()}}},"Purchase"),p>0&&d&&r.a.createElement("p",null,d),m.hasTargetServer&&r.a.createElement(o.a,{serverType:o.b.Foreign,onChange:function(e){a(e.target.value)},style:{margin:"5px"}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(28);function o(e){return r.a.createElement("button",{className:e.className,onClick:e.onClick},e.text)}function s(e){if(null==e.purchaseMultiplier)throw new Error("MultiplierButtons constructed without required props");const t=["x1","x5","x10","MAX"],a=e.onClicks,n=[];for(let s=0;se?n.createElement("span",{key:e,className:"tooltip",style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:this.props.enterLocation.bind(this,e)},n.createElement("b",null,"X")):n.createElement("span",null,"*"),t=/[A-Z]/g,a={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25},r=n=>{const r=[],i=[];let o;for(;null!==(o=t.exec(n));)i.push(o);if(0===i.length)return r.push(n),r;for(let t=0;tn.createElement("li",{key:e},n.createElement(i.a,{onClick:this.props.enterLocation.bind(this,e),text:e})));return n.createElement("ul",null,e)}render(){return n.createElement(n.Fragment,null,r.a.DisableASCIIArt?this.listCity():this.asciiCity())}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a(965),i=a(967),o=a(968),s=a(969),l=a(970),c=a(972),u=a(978),m=a(980),h=a(981),p=a(40),d=a(33),f=a(51),g=a(35),y=a(22),b=a(989);class E extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"}}getLocationSpecificContent(){const e=[];return this.props.loc.types.includes(p.a.Company)&&e.push(n.createElement(r.a,{engine:this.props.engine,key:"companylocation",locName:this.props.loc.name,p:this.props.p})),this.props.loc.types.includes(p.a.Gym)&&e.push(n.createElement(i.a,{key:"gymlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.Hospital)&&e.push(n.createElement(o.a,{key:"hospitallocation",p:this.props.p})),this.props.loc.types.includes(p.a.Slums)&&e.push(n.createElement(s.a,{key:"slumslocation",p:this.props.p})),this.props.loc.types.includes(p.a.Special)&&e.push(n.createElement(l.a,{engine:this.props.engine,key:"speciallocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.TechVendor)&&e.push(n.createElement(c.a,{key:"techvendorlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.TravelAgency)&&e.push(n.createElement(u.a,{key:"travelagencylocation",p:this.props.p,travel:this.props.travel})),this.props.loc.types.includes(p.a.University)&&e.push(n.createElement(m.a,{key:"universitylocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.Casino)&&e.push(n.createElement(h.a,{key:"casinoLocation",p:this.props.p})),e}render(){const e=this.getLocationSpecificContent(),t=f.a.getIp(this.props.loc.name),a=Object(g.b)(t),r=null!==a&&Object(g.d)(a);return n.createElement("div",null,n.createElement(y.a,{onClick:this.props.returnToCity,style:this.btnStyle,text:"Return to World"}),n.createElement("h1",{className:"noselect"},r&&!d.a.DisableTextEffects?n.createElement(b.a,{content:this.props.loc.name}):this.props.loc.name),e)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a(213),i=a(328),o=a(47),s=a(261),l=a(64),c=a(23),u=a(22),m=a(75),h=a(337),p=a(17),d=a(966);function f(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const g={display:"block"};class y extends n.Component{constructor(e){if(super(e),f(this,"companyPosition",null),f(this,"jobTitle",null),this.btnStyle={display:"block"},this.quit=this.quit.bind(this),this.applyForAgentJob=this.applyForAgentJob.bind(this),this.applyForBusinessConsultantJob=this.applyForBusinessConsultantJob.bind(this),this.applyForBusinessJob=this.applyForBusinessJob.bind(this),this.applyForEmployeeJob=this.applyForEmployeeJob.bind(this),this.applyForItJob=this.applyForItJob.bind(this),this.applyForPartTimeEmployeeJob=this.applyForPartTimeEmployeeJob.bind(this),this.applyForPartTimeWaiterJob=this.applyForPartTimeWaiterJob.bind(this),this.applyForSecurityJob=this.applyForSecurityJob.bind(this),this.applyForSoftwareConsultantJob=this.applyForSoftwareConsultantJob.bind(this),this.applyForSoftwareJob=this.applyForSoftwareJob.bind(this),this.applyForWaiterJob=this.applyForWaiterJob.bind(this),this.startInfiltration=this.startInfiltration.bind(this),this.work=this.work.bind(this),this.location=i.a[e.locName],null==this.location)throw new Error("CompanyLocation component constructed with invalid location: "+e.locName);if(this.company=o.a[e.locName],null==this.company)throw new Error("CompanyLocation component constructed with invalid company: "+e.locName);this.state={employedHere:!1},this.props.p.location=e.locName,this.checkIfEmployedHere(!1)}applyForAgentJob(e){e.isTrusted&&(this.props.p.applyForAgentJob(),this.checkIfEmployedHere(!0))}applyForBusinessConsultantJob(e){e.isTrusted&&(this.props.p.applyForBusinessConsultantJob(),this.checkIfEmployedHere(!0))}applyForBusinessJob(e){e.isTrusted&&(this.props.p.applyForBusinessJob(),this.checkIfEmployedHere(!0))}applyForEmployeeJob(e){e.isTrusted&&(this.props.p.applyForEmployeeJob(),this.checkIfEmployedHere(!0))}applyForItJob(e){e.isTrusted&&(this.props.p.applyForItJob(),this.checkIfEmployedHere(!0))}applyForPartTimeEmployeeJob(e){e.isTrusted&&(this.props.p.applyForPartTimeEmployeeJob(),this.checkIfEmployedHere(!0))}applyForPartTimeWaiterJob(e){e.isTrusted&&(this.props.p.applyForPartTimeWaiterJob(),this.checkIfEmployedHere(!0))}applyForSecurityJob(e){e.isTrusted&&(this.props.p.applyForSecurityJob(),this.checkIfEmployedHere(!0))}applyForSoftwareConsultantJob(e){e.isTrusted&&(this.props.p.applyForSoftwareConsultantJob(),this.checkIfEmployedHere(!0))}applyForSoftwareJob(e){e.isTrusted&&(this.props.p.applyForSoftwareJob(),this.checkIfEmployedHere(!0))}applyForWaiterJob(e){e.isTrusted&&(this.props.p.applyForWaiterJob(),this.checkIfEmployedHere(!0))}checkIfEmployedHere(e=!1){this.jobTitle=this.props.p.jobs[this.props.locName],null!=this.jobTitle&&(this.companyPosition=l.a[this.jobTitle]),e&&this.setState({employedHere:null!=this.jobTitle})}startInfiltration(e){if(!e.isTrusted)return;const t=this.location;if(!t.infiltrationData)return void console.error(`trying to start infiltration at ${this.props.locName} but the infiltrationData is null`);this.props.engine.loadInfiltrationContent(this.props.locName,t.infiltrationData.startingSecurityLevel,t.infiltrationData.maxClearanceLevel);t.infiltrationData}work(e){if(!e.isTrusted)return;const t=this.companyPosition;t instanceof s.a&&(t.isPartTimeJob()||t.isSoftwareConsultantJob()||t.isBusinessConsultantJob()?this.props.p.startWorkPartTime(this.props.locName):this.props.p.startWork(this.props.locName))}quit(e){if(!e.isTrusted)return;Object(p.a)("quit-job-popup",d.a,{locName:this.props.locName,company:this.company,player:this.props.p,onQuit:()=>this.checkIfEmployedHere(!0),popupId:"quit-job-popup"})}render(){const e=null!=this.jobTitle,t=this.company.getFavorGain();return n.createElement("div",null,e&&n.createElement("div",null,n.createElement("p",null,"Job Title: ",this.jobTitle),n.createElement("br",null),n.createElement("p",{style:g},"-------------------------"),n.createElement("br",null),n.createElement("p",{className:"tooltip"},"Company reputation: ",Object(m.a)(this.company.playerReputation),n.createElement("span",{className:"tooltiptext"},"You will earn ",Object(h.a)(t[0])," company favor upon resetting after installing Augmentations")),n.createElement("br",null),n.createElement("br",null),n.createElement("p",{style:g},"-------------------------"),n.createElement("br",null),n.createElement("p",{className:"tooltip"},"Company Favor: ",Object(h.a)(this.company.favor),n.createElement("span",{className:"tooltiptext"},"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.")),n.createElement("br",null),n.createElement("br",null),n.createElement("p",{style:g},"-------------------------"),n.createElement("br",null),n.createElement(u.a,{onClick:this.work,text:"Work"}),"    ",n.createElement(u.a,{onClick:this.quit,text:"Quit"})),this.company.hasAgentPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.a[0]],onClick:this.applyForAgentJob,p:this.props.p,style:this.btnStyle,text:"Apply for Agent Job"}),this.company.hasBusinessConsultantPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.c[0]],onClick:this.applyForBusinessConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Consultant Job"}),this.company.hasBusinessPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.b[0]],onClick:this.applyForBusinessJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Job"}),this.company.hasEmployeePositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.e[1]],onClick:this.applyForEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be an Employee"}),this.company.hasEmployeePositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.g[1]],onClick:this.applyForPartTimeEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Employee"}),this.company.hasITPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.d[0]],onClick:this.applyForItJob,p:this.props.p,style:this.btnStyle,text:"Apply for IT Job"}),this.company.hasSecurityPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.h[2]],onClick:this.applyForSecurityJob,p:this.props.p,style:this.btnStyle,text:"Apply for Security Job"}),this.company.hasSoftwareConsultantPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.k[0]],onClick:this.applyForSoftwareConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Consultant Job"}),this.company.hasSoftwarePositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.j[0]],onClick:this.applyForSoftwareJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Job"}),this.company.hasWaiterPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.e[0]],onClick:this.applyForWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a Waiter"}),this.company.hasWaiterPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.g[0]],onClick:this.applyForPartTimeWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Waiter"}),null!=this.location.infiltrationData&&n.createElement(u.a,{onClick:this.startInfiltration,style:this.btnStyle,text:"Infiltrate Company"}),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(17);function o(e){return r.a.createElement(r.a.Fragment,null,"Would you like to quit your job at ",e.company.name,"?",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("button",{autoFocus:!0,className:"std-button",onClick:function(){e.player.quitJob(e.locName),e.onQuit(),Object(i.b)(e.popupId)}},"Quit"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(5),i=a(35),o=a(51),s=a(22),l=a(11);class c extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.trainStrength=this.trainStrength.bind(this),this.trainDefense=this.trainDefense.bind(this),this.trainDexterity=this.trainDexterity.bind(this),this.trainAgility=this.trainAgility.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=o.a.getIp(this.props.loc.name),t=Object(i.b)(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const a=t.backdoorInstalled?.9:1;return this.props.loc.costMult*a}train(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}trainStrength(){this.train(r.a.ClassGymStrength)}trainDefense(){this.train(r.a.ClassGymDefense)}trainDexterity(){this.train(r.a.ClassGymDexterity)}trainAgility(){this.train(r.a.ClassGymAgility)}render(){const e=r.a.ClassGymBaseCost*this.calculateCost();return n.createElement("div",null,n.createElement(s.a,{onClick:this.trainStrength,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Strength (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}),n.createElement(s.a,{onClick:this.trainDefense,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Defense (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}),n.createElement(s.a,{onClick:this.trainDexterity,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Dexterity (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}),n.createElement(s.a,{onClick:this.trainAgility,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Agility (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(292),i=a(138),o=a(11),s=a(9);class l extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.getCost=this.getCost.bind(this),this.getHealed=this.getHealed.bind(this),this.state={currHp:this.props.p.hp}}getCost(){return Object(r.b)(this.props.p)}getHealed(e){if(!e.isTrusted)return;if(this.props.p.hp<0&&(this.props.p.hp=0),this.props.p.hp>=this.props.p.max_hp)return;const t=this.getCost();this.props.p.loseMoney(t),this.props.p.hp=this.props.p.max_hp,this.props.p.recordMoneySource(-1*t,"hospitalization"),this.setState({currHp:this.props.p.hp}),Object(s.a)(n.createElement(n.Fragment,null,"You were healed to full health! The hospital billed you for ",n.createElement(o.a,{money:t})))}render(){const e=this.getCost();return n.createElement(i.a,{onClick:this.getHealed,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Get treatment for wounds - ",n.createElement(o.a,{money:e,player:this.props.p}))})}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(60),i=a(2),o=a(138);class s extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.shoplift=this.shoplift.bind(this),this.robStore=this.robStore.bind(this),this.mug=this.mug.bind(this),this.larceny=this.larceny.bind(this),this.dealDrugs=this.dealDrugs.bind(this),this.bondForgery=this.bondForgery.bind(this),this.traffickArms=this.traffickArms.bind(this),this.homicide=this.homicide.bind(this),this.grandTheftAuto=this.grandTheftAuto.bind(this),this.kidnap=this.kidnap.bind(this),this.assassinate=this.assassinate.bind(this),this.heist=this.heist.bind(this)}shoplift(e){e.isTrusted&&r.a.Shoplift.commit(this.props.p)}robStore(e){e.isTrusted&&r.a.RobStore.commit(this.props.p)}mug(e){e.isTrusted&&r.a.Mug.commit(this.props.p)}larceny(e){e.isTrusted&&r.a.Larceny.commit(this.props.p)}dealDrugs(e){e.isTrusted&&r.a.DealDrugs.commit(this.props.p)}bondForgery(e){e.isTrusted&&r.a.BondForgery.commit(this.props.p)}traffickArms(e){e.isTrusted&&r.a.TraffickArms.commit(this.props.p)}homicide(e){e.isTrusted&&r.a.Homicide.commit(this.props.p)}grandTheftAuto(e){e.isTrusted&&r.a.GrandTheftAuto.commit(this.props.p)}kidnap(e){e.isTrusted&&r.a.Kidnap.commit(this.props.p)}assassinate(e){e.isTrusted&&r.a.Assassination.commit(this.props.p)}heist(e){e.isTrusted&&r.a.Heist.commit(this.props.p)}render(){const e=r.a.Shoplift.successRate(this.props.p),t=r.a.RobStore.successRate(this.props.p),a=r.a.Mug.successRate(this.props.p),s=r.a.Larceny.successRate(this.props.p),l=r.a.DealDrugs.successRate(this.props.p),c=r.a.BondForgery.successRate(this.props.p),u=r.a.TraffickArms.successRate(this.props.p),m=r.a.Homicide.successRate(this.props.p),h=r.a.GrandTheftAuto.successRate(this.props.p),p=r.a.Kidnap.successRate(this.props.p),d=r.a.Assassination.successRate(this.props.p),f=r.a.Heist.successRate(this.props.p);return n.createElement("div",null,n.createElement(o.a,{intervalTime:5e3,onClick:this.shoplift,style:this.btnStyle,text:`Shoplift (${i.a.formatPercentage(e)} chance of success)`,tooltip:"Attempt to shoplift from a low-end retailer"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.robStore,style:this.btnStyle,text:`Rob store (${i.a.formatPercentage(t)} chance of success)`,tooltip:"Attempt to commit armed robbery on a high-end store"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.mug,style:this.btnStyle,text:`Mug someone (${i.a.formatPercentage(a)} chance of success)`,tooltip:"Attempt to mug a random person on the street"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.larceny,style:this.btnStyle,text:`Larceny (${i.a.formatPercentage(s)} chance of success)`,tooltip:"Attempt to rob property from someone's house"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.dealDrugs,style:this.btnStyle,text:`Deal Drugs (${i.a.formatPercentage(l)} chance of success)`,tooltip:"Attempt to deal drugs"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.bondForgery,style:this.btnStyle,text:`Bond Forgery (${i.a.formatPercentage(c)} chance of success)`,tooltip:"Attempt to forge corporate bonds"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.traffickArms,style:this.btnStyle,text:`Traffick illegal Arms (${i.a.formatPercentage(u)} chance of success)`,tooltip:"Attempt to smuggle illegal arms into the city"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.homicide,style:this.btnStyle,text:`Homicide (${i.a.formatPercentage(m)} chance of success)`,tooltip:"Attempt to murder a random person on the street"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.grandTheftAuto,style:this.btnStyle,text:`Grand theft Auto (${i.a.formatPercentage(h)} chance of success)`,tooltip:"Attempt to commit grand theft auto"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.kidnap,style:this.btnStyle,text:`Kidnap and Ransom (${i.a.formatPercentage(p)} chance of success)`,tooltip:"Attempt to kidnap and ransom a high-profile-target"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.assassinate,style:this.btnStyle,text:`Assassinate (${i.a.formatPercentage(d)} chance of success)`,tooltip:"Attempt to assassinate a high-profile target"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.heist,style:this.btnStyle,text:`Heist (${i.a.formatPercentage(f)} chance of success)`,tooltip:"Attempt to pull off the ultimate heist"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(971),i=a(17),o=a(7),s=a(138),l=a(22),c=a(9);class u extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.renderNoodleBar=this.renderNoodleBar.bind(this),this.createCorporationPopup=this.createCorporationPopup.bind(this),this.handleBladeburner=this.handleBladeburner.bind(this),this.handleResleeving=this.handleResleeving.bind(this),this.state={inBladeburner:this.props.p.inBladeburner()}}createCorporationPopup(){const e="create-start-corporation-popup";Object(i.a)(e,r.a,{player:this.props.p,popupId:e})}handleBladeburner(){const e=this.props.p;if(e.inBladeburner())this.props.engine.loadBladeburnerContent();else if(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100){e.startBladeburner({new:!0}),Object(c.a)("You have been accepted into the Bladeburner division!"),this.setState({inBladeburner:!0});const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else Object(c.a)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}handleResleeving(){this.props.engine.loadResleevingContent()}renderBladeburner(){if(!this.props.p.canAccessBladeburner())return null;const e=this.state.inBladeburner?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return n.createElement(l.a,{onClick:this.handleBladeburner,style:this.btnStyle,text:e})}renderNoodleBar(){return n.createElement(l.a,{onClick:function(){Object(c.a)(n.createElement(n.Fragment,null,"You ate some delicious noodles and feel refreshed."))},style:this.btnStyle,text:"Eat noodles"})}renderCreateCorporation(){return this.props.p.canAccessCorporation()?n.createElement(s.a,{disabled:!this.props.p.canAccessCorporation()||this.props.p.hasCorporation(),onClick:this.createCorporationPopup,style:this.btnStyle,text:"Create a Corporation"}):n.createElement(n.Fragment,null,n.createElement("p",null,n.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}renderResleeving(){return this.props.p.canAccessResleeving()?n.createElement(l.a,{onClick:this.handleResleeving,style:this.btnStyle,text:"Re-Sleeve"}):null}render(){switch(this.props.loc.name){case o.a.NewTokyoVitaLife:return this.renderResleeving();case o.a.Sector12CityHall:return this.renderCreateCorporation();case o.a.Sector12NSA:return this.renderBladeburner();case o.a.NewTokyoNoodleBar:return this.renderNoodleBar();default:console.error(`Location ${this.props.loc.name} doesn't have any special properties`)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(17),o=a(11),s=a(9);function l(e){if(!e.player.canAccessCorporation()||e.player.hasCorporation())return Object(i.b)(e.popupId),r.a.createElement(r.a.Fragment,null);const[t,a]=Object(n.useState)("");return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares",r.a.createElement("br",null),r.a.createElement("br",null),"If you would like to start one, please enter a name for your corporation below:"),r.a.createElement("input",{autoFocus:!0,className:"text-input",placeholder:"Corporation Name",onChange:function(e){a(e.target.value)},value:t}),r.a.createElement("button",{className:"std-button",onClick:function(){""!=t?(e.player.startCorporation(t,5e8),Object(s.a)("Congratulations! You just started your own corporation with government seed money. You can visit and manage your company in the City."),Object(i.b)(e.popupId)):Object(s.a)("Invalid company name!")},disabled:""==t},"Use seed money"),r.a.createElement("button",{className:"std-button",onClick:function(){e.player.canAfford(15e10)?""!=t?(e.player.startCorporation(t),e.player.loseMoney(15e10),Object(s.a)("Congratulations! You just self-funded your own corporation. You can visit and manage your company in the City."),Object(i.b)(e.popupId)):Object(s.a)("Invalid company name!"):Object(s.a)("You don't have enough money to create a corporation! You need $150b.")},disabled:""==t||!e.player.canAfford(15e10)},"Self-Fund (",r.a.createElement(o.a,{money:15e10,player:e.player}),")"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(973),o=a(974),s=a(976),l=a(170),c=a(22),u=a(11),m=a(17),h=a(977);function p(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}function p(e,t,n){Object(m.a)("purchase-server-popup",h.a,{ram:e,cost:t,p:n,popupId:"purchase-server-popup",rerender:a})}Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]);const d={display:"block"},f=[];for(let t=e.loc.techVendorMinRam;t<=e.loc.techVendorMaxRam;t*=2){const a=Object(l.a)(t);f.push(r.a.createElement(c.a,{key:t,onClick:()=>p(t,a,e.p),style:d,text:r.a.createElement(r.a.Fragment,null,"Purchase ",t,"GB Server - ",r.a.createElement(u.a,{money:a,player:e.p})),disabled:!e.p.canAfford(a)}))}return r.a.createElement("div",null,f,r.a.createElement("br",null),r.a.createElement("p",{className:"noselect"},r.a.createElement("i",null,'"You can order bigger servers via scripts. We don\'t take custom order in person."')),r.a.createElement("br",null),r.a.createElement(o.a,{p:e.p,rerender:a}),r.a.createElement(i.a,{p:e.p,rerender:a}),r.a.createElement(s.a,{p:e.p,rerender:a}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(5),o=a(170),s=a(219),l=a(22),c=a(11),u=a(194);function m(e){const t={display:"block"},a=e.p.getHomeComputer();if(a.maxRam>=i.a.HomeComputerMaxRam)return r.a.createElement(s.a,{style:t,text:"Upgrade 'home' RAM - MAX"});const n=e.p.getUpgradeHomeRamCost();return r.a.createElement(l.a,{disabled:!e.p.canAfford(n),onClick:function(){Object(o.d)(e.p),e.rerender()},style:t,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' RAM (",a.maxRam,"GB -> ",2*a.maxRam,"GB) -"," ",r.a.createElement(c.a,{money:n,player:e.p})),tooltip:r.a.createElement(u.a,{tex:String.raw`\large{cost = 3.2 \times 10^3 \times 1.58^{log_2{(ram)}}}`})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(975),o=a(5),s=a(219),l=a(22),c=a(11);function u(e){const t={display:"block"};return e.p.hasTorRouter()?r.a.createElement(s.a,{style:t,text:"TOR Router - Purchased"}):r.a.createElement(l.a,{disabled:!e.p.canAfford(o.a.TorRouterCost),onClick:function(){Object(i.a)(e.p),e.rerender()},style:t,text:r.a.createElement(r.a.Fragment,null,"Purchase TOR router - ",r.a.createElement(c.a,{money:o.a.TorRouterCost,player:e.p}))})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(5),r=a(27),i=a(35),o=a(51),s=a(9);function l(e){if(e.hasTorRouter())return void Object(s.a)("You already have a TOR Router!");if(!e.canAfford(n.a.TorRouterCost))return void Object(s.a)("You cannot afford to purchase the TOR router!");e.loseMoney(n.a.TorRouterCost);const t=Object(i.h)({ip:Object(r.c)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(r.a)(t),o.a.addIp("Darkweb Server",t.ip),e.getHomeComputer().serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.getHomeComputer().ip),Object(s.a)("You have purchased a TOR router!
You now have access to the dark web from your home computer.
Use the scan/scan-analyze commands to search for the dark web connection.")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(219),o=a(22),s=a(11),l=a(194);function c(e){const t={display:"block"},a=e.p.getHomeComputer(),n=a.cpuCores>=8;if(n)return r.a.createElement(i.a,{style:t,text:"Upgrade 'home' cores - MAX"});const c=1e9*Math.pow(7.5,a.cpuCores);return r.a.createElement(o.a,{disabled:!e.p.canAfford(c),onClick:function(){n||e.p.canAfford(c)&&(e.p.loseMoney(c),a.cpuCores++,e.rerender())},style:t,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' cores (",a.cpuCores," -> ",a.cpuCores+1,") -"," ",r.a.createElement(s.a,{money:c,player:e.p})),tooltip:r.a.createElement(l.a,{tex:String.raw`\large{cost = 10^9 \times 7.5 ^{\text{cores}}}`})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(17),o=a(170),s=a(2),l=a(11),c=a(22);function u(e){const[t,a]=Object(n.useState)("");function u(){Object(o.e)(t,e.ram,e.cost,e.p),Object(i.b)(e.popupId)}return r.a.createElement(r.a.Fragment,null,"Would you like to purchase a new server with ",s.a.formatRAM(e.ram)," of RAM for"," ",r.a.createElement(l.a,{money:e.cost,player:e.p}),"?",r.a.createElement("br",null),r.a.createElement("br",null),"Please enter the server hostname below:",r.a.createElement("br",null),r.a.createElement("div",{className:"popup-box-input-div"},r.a.createElement("input",{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&u()},onChange:function(e){a(e.target.value)},className:"text-input noselect",type:"text",placeholder:"Unique Hostname"}),r.a.createElement(c.a,{onClick:u,text:"Purchase Server",disabled:!e.p.canAfford(e.cost)})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(21),i=a(979),o=a(5),s=a(33),l=a(22),c=a(17),u=a(11),m=a(334);function h(e,t,a){if(s.a.SuppressTravelConfirmation)return void a();Object(c.a)("travel-confirmation",i.a,{player:e,city:t,travel:a,popupId:"travel-confirmation"})}function p(e){return n.createElement("div",{className:"noselect"},n.createElement("p",null,"From here, you can travel to any other city! A ticket costs"," ",n.createElement(u.a,{money:o.a.TravelCost,player:e.p}),"."),n.createElement(m.a,{currentCity:e.p.city,onTravel:t=>h(e.p,t,()=>e.travel(t))}))}function d(e){return n.createElement("div",null,n.createElement("p",null,"From here, you can travel to any other city! A ticket costs"," ",n.createElement(u.a,{money:o.a.TravelCost,player:e.p}),"."),Object.values(r.a).filter(t=>t!=e.p.city).map(t=>{const a=Object.entries(r.a).find(e=>e[1]===t);if(void 0===a)throw new Error(`could not find key for city '${t}'`);return n.createElement(l.a,{key:t,onClick:()=>h(e.p,t,()=>e.travel(a[1])),style:{display:"block"},text:"Travel to "+t})}))}function f(e){return s.a.DisableASCIIArt?n.createElement(d,{p:e.p,travel:e.travel}):n.createElement(p,{p:e.p,travel:e.travel})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(5),o=a(11),s=a(17);function l(e){const t=i.a.TravelCost;return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Would you like to travel to ",e.city,"? The trip will cost ",r.a.createElement(o.a,{money:t,player:e.player}),"."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("button",{className:"std-button",onClick:function(){e.travel(),Object(s.b)(e.popupId)}},"Travel"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(5),i=a(35),o=a(51),s=a(22),l=a(11);class c extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.take=this.take.bind(this),this.study=this.study.bind(this),this.dataStructures=this.dataStructures.bind(this),this.networks=this.networks.bind(this),this.algorithms=this.algorithms.bind(this),this.management=this.management.bind(this),this.leadership=this.leadership.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=o.a.getIp(this.props.loc.name),t=Object(i.b)(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const a=t.backdoorInstalled?.9:1;return this.props.loc.costMult*a}take(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}study(){this.take(r.a.ClassStudyComputerScience)}dataStructures(){this.take(r.a.ClassDataStructures)}networks(){this.take(r.a.ClassNetworks)}algorithms(){this.take(r.a.ClassAlgorithms)}management(){this.take(r.a.ClassManagement)}leadership(){this.take(r.a.ClassLeadership)}render(){const e=this.calculateCost(),t=r.a.ClassDataStructuresBaseCost*e,a=r.a.ClassNetworksBaseCost*e,i=r.a.ClassAlgorithmsBaseCost*e,o=r.a.ClassManagementBaseCost*e,c=r.a.ClassLeadershipBaseCost*e;return n.createElement("div",null,n.createElement(s.a,{onClick:this.study,style:this.btnStyle,text:"Study Computer Science (free)",tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.dataStructures,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Data Structures course (",n.createElement(l.a,{money:t,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.networks,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Networks course (",n.createElement(l.a,{money:a,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.algorithms,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Algorithms course (",n.createElement(l.a,{money:i,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.management,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Management course (",n.createElement(l.a,{money:o,player:this.props.p})," / sec)"),tooltip:"Gain charisma experience!"}),n.createElement(s.a,{onClick:this.leadership,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Leadership course (",n.createElement(l.a,{money:c,player:this.props.p})," / sec)"),tooltip:"Gain charisma experience!"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n,r=a(0),i=a(982),o=a(986),s=a(987),l=a(988),c=a(22);!function(e){e.None="none",e.Coin="coin",e.Slots="slots",e.Roulette="roulette",e.Blackjack="blackjack"}(n||(n={}));class u extends r.Component{constructor(e){super(e),this.state={game:n.None},this.updateGame=this.updateGame.bind(this)}updateGame(e){this.setState({game:e})}renderGames(){return r.createElement(r.Fragment,null,r.createElement(c.a,{onClick:()=>this.updateGame(n.Coin),text:"Play coin flip"}),r.createElement("br",null),r.createElement(c.a,{onClick:()=>this.updateGame(n.Slots),text:"Play slots"}),r.createElement("br",null),r.createElement(c.a,{onClick:()=>this.updateGame(n.Roulette),text:"Play roulette"}),r.createElement("br",null),r.createElement(c.a,{onClick:()=>this.updateGame(n.Blackjack),text:"Play blackjack"}))}renderGame(){let e=null;switch(this.state.game){case n.Coin:e=r.createElement(o.a,{p:this.props.p});break;case n.Slots:e=r.createElement(l.a,{p:this.props.p});break;case n.Roulette:e=r.createElement(s.a,{p:this.props.p});break;case n.Blackjack:e=r.createElement(i.a,{p:this.props.p});break;case n.None:break;default:throw new Error("MissingCaseException: "+this.state.game)}return r.createElement(r.Fragment,null,r.createElement(c.a,{onClick:()=>this.updateGame(n.None),text:"Stop playing"}),e)}render(){return this.state.game===n.None?this.renderGames():this.renderGame()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(11),i=a(270),o=a(983),s=a(394),l=a(1357),c=a(535),u=a(985),m=a(468),h=a(536);function p(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var d;!function(e){e.Pending="",e.PlayerWon="You won!",e.PlayerWonByBlackjack="You Won! Blackjack!",e.DealerWon="You lost!",e.Tie="Push! (Tie)"}(d||(d={}));class f extends i.a{constructor(e){super(e),p(this,"canStartGame",()=>{const{p:e}=this.props,{bet:t}=this.state;return e.canAfford(t)}),p(this,"startGame",()=>{if(!this.canStartGame())return;this.props.p.loseMoney(this.state.bet);const e=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),t=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:e,dealerHand:t,gameInProgress:!0,result:d.Pending}),21===this.getTrueHandValue(e)?21===this.getTrueHandValue(t)?this.finishGame(d.Tie):this.finishGame(d.PlayerWonByBlackjack):21===this.getTrueHandValue(t)&&this.finishGame(d.DealerWon)}),p(this,"getHandValue",e=>{let t=[0];for(let a=0;a=10?t.map(e=>e+10):1===n?t.flatMap(e=>[e+1,e+11]):t.map(e=>e+n)}return t}),p(this,"getTrueHandValue",e=>{const t=this.getHandValue(e),a=t.filter(e=>e<=21);return a.length>0?(a.sort((e,t)=>e-t),a[a.length-1]):t[0]}),p(this,"getHandDisplayValues",e=>{const t=this.getHandValue(e);return this.isHandBusted(e)?[...new Set([t[0]])]:[...new Set(t.filter(e=>e<=21))]}),p(this,"isHandBusted",e=>this.getTrueHandValue(e)>21),p(this,"playerHit",e=>{if(!e.isTrusted)return;const t=this.state.playerHand.addCards(this.deck.safeDrawCard());this.setState({playerHand:t}),this.isHandBusted(t)&&this.finishGame(d.DealerWon)}),p(this,"playerStay",e=>{if(!e.isTrusted)return;let t=this.state.dealerHand;for(;;){if(!(this.getTrueHandValue(t)<=16))break;t=t.addCards(this.deck.safeDrawCard())}if(this.setState({dealerHand:t}),this.isHandBusted(t))this.finishGame(d.PlayerWon);else{const e=this.getTrueHandValue(t),a=this.getTrueHandValue(this.state.playerHand);if(e>21||a>21)throw new Error("Someone busted when not expected to");a>e?this.finishGame(d.PlayerWon):a{let t=0;this.isPlayerWinResult(e)?(t=this.state.bet,this.win(this.props.p,2*t)):e===d.DealerWon?(t=-1*this.state.bet,this.win(this.props.p,-this.state.bet)):e===d.Tie&&this.win(this.props.p,this.state.bet),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t})}),p(this,"isPlayerWinResult",e=>e===d.PlayerWon||e===d.PlayerWonByBlackjack),p(this,"wagerOnChange",e=>{const{p:t}=this.props,a=e.target.value,n=Math.round(parseFloat(a));isNaN(n)?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not a valid number"}):n<=0?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Must bet a postive amount"}):n>1e8?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Exceeds max bet"}):t.canAfford(n)?this.setState({bet:n,betInput:a,wagerInvalid:!1,wagerInvalidHelperText:"",result:d.Pending}):this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),p(this,"startOnClick",e=>{e.isTrusted&&(this.state.wagerInvalid||this.startGame())}),this.deck=new o.a(5);this.state={playerHand:new s.a([]),dealerHand:new s.a([]),bet:1e6,betInput:String(1e6),gameInProgress:!1,result:d.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:e,playerHand:t,dealerHand:a,gameInProgress:i,result:o,wagerInvalid:s,wagerInvalidHelperText:p,gains:f}=this.state,g=this.getHandDisplayValues(t),y=this.getHandDisplayValues(a);return n.createElement("div",null,n.createElement("div",null,n.createElement(u.a,{value:e,label:n.createElement(n.Fragment,null,"Wager (Max: ",n.createElement(r.a,{money:1e8}),")"),disabled:i,onChange:this.wagerOnChange,error:s,helperText:s?p:"",type:"number",variant:"filled",style:{width:"200px"},InputProps:{startAdornment:n.createElement(l.a,{position:"start"},"$")}}),n.createElement("p",null,"Total earnings this session: ",n.createElement(r.a,{money:f}))),i?n.createElement("div",null,n.createElement(m.a,{color:"primary",onClick:this.playerHit},"Hit"),n.createElement(m.a,{color:"secondary",onClick:this.playerStay},"Stay")):n.createElement("div",null,n.createElement(m.a,{color:"primary",onClick:this.startOnClick,disabled:s||!this.canStartGame()},"Start")),(i||o!==d.Pending)&&n.createElement("div",null,n.createElement(h.a,{variant:"outlined",elevation:2},n.createElement("pre",null,"Player"),t.cards.map((e,t)=>n.createElement(c.a,{card:e,key:t})),n.createElement("pre",null,"Value(s): "),g.map((e,t)=>n.createElement("pre",{key:t},e))),n.createElement("br",null),n.createElement(h.a,{variant:"outlined",elevation:2},n.createElement("pre",null,"Dealer"),a.cards.map((e,t)=>n.createElement(c.a,{card:e,hidden:i&&0!==t,key:t})),!i&&n.createElement(n.Fragment,null,n.createElement("pre",null,"Value(s): "),y.map((e,t)=>n.createElement("pre",{key:t},e))))),o!==d.Pending&&n.createElement("p",null,o,this.isPlayerWinResult(o)&&n.createElement(n.Fragment,null," You gained ",n.createElement(r.a,{money:this.state.bet})),o===d.DealerWon&&n.createElement(n.Fragment,null," You lost ",n.createElement(r.a,{money:this.state.bet}))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(189),r=a(984);class i{constructor(e=1){var t,a,n;n=[],(a="cards")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.numDecks=e,this.reset()}shuffle(){this.cards=Object(r.shuffle)(this.cards)}drawCard(){if(0==this.cards.length)throw new Error("Tried to draw card from empty deck");return this.cards.shift()}safeDrawCard(){return 0===this.cards.length&&this.reset(),this.drawCard()}reset(){this.cards=[];for(let e=1;e<=13;++e)for(let t=0;t{var t,a;return r.a.createElement(i.a,s({},e,{classes:{...u(),...e.classes},InputProps:{classes:{...m(),...null===(t=e.InputProps)||void 0===t?void 0:t.classes},...e.InputProps},InputLabelProps:{classes:{...h(),...null===(a=e.InputLabelProps)||void 0===a?void 0:a.classes},...e.InputLabelProps}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(22),i=a(264),o=a(270),s=a(61);class l extends o.a{constructor(e){super(e),this.state={investment:1e3,result:n.createElement("span",null," "),status:"",playLock:!1},this.play=this.play.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e4&&(t=1e4),t<0&&(t=0),this.setState({investment:t})}play(e){if(this.reachedLimit(this.props.p))return;let t;t=i.a.random()<.5?"H":"T";const a=e===t;this.setState({result:n.createElement("span",{className:a?"text":"failure"},t),status:a?" win!":"lose!",playLock:!0}),setTimeout(()=>this.setState({playLock:!1}),250),a?this.win(this.props.p,this.state.investment):this.win(this.props.p,-this.state.investment),this.reachedLimit(this.props.p)}render(){return n.createElement(n.Fragment,null,n.createElement("pre",null,"+———————+"),n.createElement("pre",null,"| | | |"),n.createElement("pre",null,"| | ",this.state.result," | |"),n.createElement("pre",null,"| | | |"),n.createElement("pre",null,"+———————+"),n.createElement("span",{className:"text"},"Play for: "),n.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,value:this.state.investment}),n.createElement("br",null),n.createElement(r.a,{onClick:Object(s.a)(()=>this.play("H")),text:"Head!",disabled:this.state.playLock}),n.createElement(r.a,{onClick:Object(s.a)(()=>this.play("T")),text:"Tail!",disabled:this.state.playLock}),n.createElement("h1",null,this.state.status))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a(22),i=a(11),o=a(270),s=a(264),l=a(61);const c=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],u={Red:{match:e=>0!==e&&c.includes(e),payout:1},Black:{match:e=>!c.includes(e),payout:1},Odd:{match:e=>0!==e&&e%2==1,payout:1},Even:{match:e=>0!==e&&e%2==0,payout:1},High:{match:e=>0!==e&&e>18,payout:1},Low:{match:e=>0!==e&&e<19,payout:1},Third1:{match:e=>0!==e&&e<=12,payout:2},Third2:{match:e=>0!==e&&(e>=13&&e<=24),payout:2},Third3:{match:e=>0!==e&&e>=25,payout:2}};function m(e){return{match:t=>e===t,payout:36}}class h extends o.a{constructor(e){var t,a,n;super(e),n=-1,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.rng=new s.b((new Date).getTime()),this.state={investment:1e3,canPlay:!0,status:"waiting",n:0,lock:!0,strategy:{payout:0,match:()=>!1}},this.step=this.step.bind(this),this.currentNumber=this.currentNumber.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){this.state.lock||this.setState({n:Math.floor(37*Math.random())})}componentWillUnmount(){clearInterval(this.interval)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e7&&(t=1e7),t<0&&(t=0),this.setState({investment:t})}currentNumber(){if(0===this.state.n)return"0";const e=(t=this.state.n,[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].includes(t)?"R":"B");var t;return`${this.state.n}${e}`}play(e){this.reachedLimit(this.props.p)||(this.setState({canPlay:!1,lock:!1,status:"playing",strategy:e}),setTimeout(()=>{let e=Math.floor(37*this.rng.random()),t=n.createElement(n.Fragment,null),a=0,r=this.state.strategy.match(e);if(r&&Math.random()>.9)for(r=!1;this.state.strategy.match(e);)e++;r?(a=this.state.investment*this.state.strategy.payout,t=n.createElement(n.Fragment,null,"won ",n.createElement(i.a,{money:a}))):(a=-this.state.investment,t=n.createElement(n.Fragment,null,"lost ",n.createElement(i.a,{money:-a}))),this.win(this.props.p,a),this.setState({canPlay:!0,lock:!0,status:t,n:e}),this.reachedLimit(this.props.p)},1600))}render(){return n.createElement(n.Fragment,null,n.createElement("h1",null,this.currentNumber()),n.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),n.createElement("h1",null,this.state.status),n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"3",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(3)))})),n.createElement("td",null,n.createElement(r.a,{text:"6",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(6)))})),n.createElement("td",null,n.createElement(r.a,{text:"9",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(9)))})),n.createElement("td",null,n.createElement(r.a,{text:"12",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(12)))})),n.createElement("td",null,n.createElement(r.a,{text:"15",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(15)))})),n.createElement("td",null,n.createElement(r.a,{text:"18",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(18)))})),n.createElement("td",null,n.createElement(r.a,{text:"21",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(21)))})),n.createElement("td",null,n.createElement(r.a,{text:"24",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(24)))})),n.createElement("td",null,n.createElement(r.a,{text:"27",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(27)))})),n.createElement("td",null,n.createElement(r.a,{text:"30",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(30)))})),n.createElement("td",null,n.createElement(r.a,{text:"33",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(33)))})),n.createElement("td",null,n.createElement(r.a,{text:"36",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(36)))}))),n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"2",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(2)))})),n.createElement("td",null,n.createElement(r.a,{text:"5",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(5)))})),n.createElement("td",null,n.createElement(r.a,{text:"8",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(8)))})),n.createElement("td",null,n.createElement(r.a,{text:"11",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(11)))})),n.createElement("td",null,n.createElement(r.a,{text:"14",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(14)))})),n.createElement("td",null,n.createElement(r.a,{text:"17",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(17)))})),n.createElement("td",null,n.createElement(r.a,{text:"20",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(20)))})),n.createElement("td",null,n.createElement(r.a,{text:"23",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(23)))})),n.createElement("td",null,n.createElement(r.a,{text:"26",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(26)))})),n.createElement("td",null,n.createElement(r.a,{text:"29",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(29)))})),n.createElement("td",null,n.createElement(r.a,{text:"32",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(32)))})),n.createElement("td",null,n.createElement(r.a,{text:"35",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(35)))}))),n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"1",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(1)))})),n.createElement("td",null,n.createElement(r.a,{text:"4",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(4)))})),n.createElement("td",null,n.createElement(r.a,{text:"7",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(7)))})),n.createElement("td",null,n.createElement(r.a,{text:"10",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(10)))})),n.createElement("td",null,n.createElement(r.a,{text:"13",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(13)))})),n.createElement("td",null,n.createElement(r.a,{text:"16",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(16)))})),n.createElement("td",null,n.createElement(r.a,{text:"19",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(19)))})),n.createElement("td",null,n.createElement(r.a,{text:"22",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(22)))})),n.createElement("td",null,n.createElement(r.a,{text:"25",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(25)))})),n.createElement("td",null,n.createElement(r.a,{text:"28",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(28)))})),n.createElement("td",null,n.createElement(r.a,{text:"31",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(31)))})),n.createElement("td",null,n.createElement(r.a,{text:"34",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(34)))}))),n.createElement("tr",null,n.createElement("td",{colSpan:4},n.createElement(r.a,{text:"1 to 12",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Third1))})),n.createElement("td",{colSpan:4},n.createElement(r.a,{text:"13 to 24",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Third2))})),n.createElement("td",{colSpan:4},n.createElement(r.a,{text:"25 to 36",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Third3))}))),n.createElement("tr",null,n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Red",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Red))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Black",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Black))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Odd",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Odd))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Even",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Even))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"High",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.High))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Low",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Low))}))),n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"0",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(0)))}))))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a(22),i=a(11),o=a(264),s=a(270),l=a(61);const c=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function u(e,t){switch(e){case"$":return[20,200,1e3][t];case"@":return[8,80,400][t];case"♥":case"?":return[6,20,150][t];case"D":case"E":return[1,8,30][t];default:return[1,5,20][t]}}const m=[[[0,0],[0,1],[0,2],[0,3],[0,4]],[[1,0],[1,1],[1,2],[1,3],[1,4]],[[2,0],[2,1],[2,2],[2,3],[2,4]],[[2,0],[1,1],[0,2],[1,3],[2,4]],[[0,0],[1,1],[2,2],[1,3],[0,4]],[[0,0],[1,1],[1,2],[1,3],[0,4]],[[2,0],[1,1],[1,2],[1,3],[2,4]],[[1,0],[0,1],[0,2],[0,3],[1,4]],[[1,0],[2,1],[2,2],[2,3],[1,4]]];class h extends s.a{constructor(e){var t,a,n;super(e),n=-1,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.rng=new o.b(this.props.p.totalPlaytime),this.state={index:[0,0,0,0,0],investment:1e3,locks:[0,0,0,0,0],canPlay:!0,status:"waiting"},this.play=this.play.bind(this),this.lock=this.lock.bind(this),this.unlock=this.unlock.bind(this),this.step=this.step.bind(this),this.checkWinnings=this.checkWinnings.bind(this),this.getTable=this.getTable.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){let e=!1;const t=this.state.index.slice();for(const a in t)(t[a]!==this.state.locks[a]||e)&&(t[a]=(t[a]+1)%c.length,e=!0);this.setState({index:t}),e&&t.every((e,t)=>e===this.state.locks[t])&&this.checkWinnings()}componentWillUnmount(){clearInterval(this.interval)}getTable(){return[[c[(this.state.index[0]+c.length-1)%c.length],c[(this.state.index[1]+c.length-1)%c.length],c[(this.state.index[2]+c.length-1)%c.length],c[(this.state.index[3]+c.length-1)%c.length],c[(this.state.index[4]+c.length-1)%c.length]],[c[this.state.index[0]],c[this.state.index[1]],c[this.state.index[2]],c[this.state.index[3]],c[this.state.index[4]]],[c[(this.state.index[0]+1)%c.length],c[(this.state.index[1]+1)%c.length],c[(this.state.index[2]+1)%c.length],c[(this.state.index[3]+1)%c.length],c[(this.state.index[4]+1)%c.length]]]}play(){this.reachedLimit(this.props.p)||(this.setState({status:"playing"}),this.win(this.props.p,-this.state.investment),this.state.canPlay&&(this.unlock(),setTimeout(this.lock,2e3*this.rng.random()+1e3)))}lock(){this.setState({locks:[Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length)]})}checkWinnings(){const e=this.getTable(),t=function(t){const a=[];for(const n of t)a.push(e[n[0]][n[1]]);return a},a=function(e){let t=1;for(let a=1;a0?"gained":"lost"," ",n.createElement(i.a,{money:Math.abs(r)})),canPlay:!0}),this.reachedLimit(this.props.p)}unlock(){this.setState({locks:[-1,-1,-1,-1,-1],canPlay:!1})}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e6&&(t=1e6),t<0&&(t=0),this.setState({investment:t})}render(){const e=this.getTable();return n.createElement(n.Fragment,null,n.createElement("pre",null,"+———————————————————————+"),n.createElement("pre",null,"| | ",e[0][0]," | ",e[0][1]," | ",e[0][2]," | ",e[0][3]," | ",e[0][4]," | |"),n.createElement("pre",null,"| | | | | | | |"),n.createElement("pre",null,"| | ",c[this.state.index[0]]," | ",c[this.state.index[1]]," | ",c[this.state.index[2]]," | ",c[this.state.index[3]]," | ",c[this.state.index[4]]," | |"),n.createElement("pre",null,"| | | | | | | |"),n.createElement("pre",null,"| | ",c[(this.state.index[0]+1)%c.length]," | ",c[(this.state.index[1]+1)%c.length]," | ",c[(this.state.index[2]+1)%c.length]," | ",c[(this.state.index[3]+1)%c.length]," | ",c[(this.state.index[4]+1)%c.length]," | |"),n.createElement("pre",null,"+———————————————————————+"),n.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),n.createElement(r.a,{onClick:Object(l.a)(this.play),text:"Spin!",disabled:!this.state.canPlay}),n.createElement("h1",null,this.state.status),n.createElement("h2",null,"Pay lines"),n.createElement("pre",null,"----- ····· ·····"),n.createElement("pre",null,"····· ----- ·····"),n.createElement("pre",null,"····· ····· -----"),n.createElement("br",null),n.createElement("pre",null,"··^·· \\···/ \\···/"),n.createElement("pre",null,"·/·\\· ·\\·/· ·---·"),n.createElement("pre",null,"/···\\ ··v·· ·····"),n.createElement("br",null),n.createElement("pre",null,"····· ·---· ·····"),n.createElement("pre",null,"·---· /···\\ \\···/"),n.createElement("pre",null,"/···\\ ····· ·---·"))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){const[t,a]=Object(n.useState)(e.content);return Object(n.useEffect)(()=>{let e=5;const n=setInterval(()=>{if(e--,e>0)return;e=5*Math.random();const n=Math.random()*t.length,r=t.charAt(n);a(function(e,t,a){return e.substring(0,t)+a+e.substring(t+1)}(t,n,function(e){const t=e=>e[Math.floor(Math.random()*e.length)],a=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const n of a)if(n.includes(e))return t(n);return t("!@#$%^&*()_+|\\';\"/.,?`~")}(r))),setTimeout(()=>{a(t)},50)},100);return()=>{clearInterval(n)}},[]),r.a.createElement("span",null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(441),o=a(215),s=a(30),l=a(549),c=a(105),u=a(48);function m(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("div",null,r.a.createElement(o.a,null,r.a.createElement(s.a,null,"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later.")),r.a.createElement(l.a,null,Object(i.a)(e.player).map(t=>{const a=t.create;return null===a?r.a.createElement(r.a.Fragment,null):r.a.createElement(c.a,{title:a.tooltip},r.a.createElement(u.a,{onClick:()=>e.player.startCreateProgramWork(t.name,a.time,a.level)},t.name))}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return T}));var n=a(0),r=a.n(n),i=a(22),o=a(992),s=a(17),l=a(1005),c=a(1006),u=a(88),m=a(9),h=a(295),p=a(83),d=a(272),f=a(195),g=a(416),y=a(222),b=a(2),E=a(538),v=a(539),k=a(373),_=a(33),C=a(49);let w=[];!function(){const e=Object(k.a)({});w=function e(t){let a=[];const n=Object.keys(t);for(const r of n)"object"==typeof t[r]&&(a.push(r),a=a.concat(e(t[r]))),"function"==typeof t[r]&&a.push(r);return a}(e);const t=["heart","break","exploit","bypass","corporation"];w=w.filter(e=>!t.includes(e))}();let S="",x="",O=null;function T(e){const t=Object(n.useRef)(null),[a,k]=Object(n.useState)(e.filename?e.filename:S),[T,M]=Object(n.useState)(e.code?e.code:x),[P,A]=Object(n.useState)("RAM: ???"),[R,N]=Object(n.useState)({theme:_.a.MonacoTheme,insertSpaces:_.a.MonacoInsertSpaces});function I(){if(null!==t.current){const e=t.current.getPosition();null!==e&&E.a.saveCursor(a,{row:e.lineNumber,column:e.column})}if(O=null,C.a.isRunning&&C.a.currStep===C.d.TerminalTypeScript){if("n00dles.script"!==a)return void Object(m.a)("Leave the script name as 'n00dles'!");if(-1==T.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void Object(m.a)("Please copy and paste the code from the tutorial!");const t=e.player.getCurrentServer();if(null===t)throw new Error("Server should not be null but it is.");for(let n=0;n0)){switch(a){case y.a.ImportError:A("RAM: Import Error");break;case y.a.URLImportError:A("RAM: HTTP Import Error");break;case y.a.SyntaxError:default:A("RAM: Syntax Error")}return new Promise(()=>{})}A("RAM: "+b.a.formatRAM(a))}return Object(n.useEffect)(()=>{""!==e.filename&&(S=e.filename,x=e.code,O=null)},[]),Object(n.useEffect)(()=>{const e=setInterval(j,1e3);return()=>clearInterval(e)},[T]),Object(n.useEffect)(()=>{function e(e){_.a.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),I())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),r.a.createElement("div",{className:"script-editor-wrapper"},r.a.createElement("div",{id:"script-editor-filename-wrapper"},r.a.createElement("p",{id:"script-editor-filename-tag",className:"noselect"}," ",r.a.createElement("strong",{style:{backgroundColor:"#555"}},"Script name: ")),r.a.createElement("input",{id:"script-editor-filename",type:"text",maxLength:100,tabIndex:1,value:a,onChange:function(e){S=a,k(e.target.value)}}),r.a.createElement(i.a,{text:"options",onClick:function(){const e="script-editor-options-popup",t={theme:"",insertSpaces:!1};Object.assign(t,R),Object(s.a)(e,l.a,{id:e,options:t,save:e=>{N(e),_.a.MonacoTheme=e.theme,_.a.MonacoInsertSpaces=e.insertSpaces}})}})),r.a.createElement(o.a,{beforeMount:function(e){e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const a of w)t.push({label:a,kind:e.languages.CompletionItemKind.Function,insertText:a,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(v.a,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(v.a,"netscript.d.ts")},onMount:function(e){if(t.current=e,null===t.current)return;const n=E.a.getCursor(a);-1!==n.row?t.current.setPosition({lineNumber:n.row,column:n.column}):null!==O&&t.current.setPosition({lineNumber:O.lineNumber,column:O.column+1}),t.current.focus()},loading:r.a.createElement("p",null,"Loading script editor!"),height:"80%",defaultLanguage:"javascript",defaultValue:T,onChange:function(e){void 0!==e&&(x=e,null!==t.current&&(O=t.current.getPosition()),M(e))},theme:R.theme,options:R}),r.a.createElement("div",{id:"script-editor-buttons-wrapper"},r.a.createElement(i.a,{text:"Beautify",onClick:function(){if(null===t.current)return;const e=Object(c.js_beautify)(T,{indent_with_tabs:!R.insertSpaces,indent_size:4,brace_style:"preserve-inline"});t.current.setValue(e)}}),r.a.createElement("p",{id:"script-editor-status-text",style:{display:"inline-block",margin:"10px"}},P),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:I},"Save & Close (Ctrl/Cmd + b)"),r.a.createElement("a",{className:"std-button",style:{display:"inline-block"},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Netscript Documentation")))}},,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(22),o=a(17);function s(e){const[t,a]=Object(n.useState)(e.options.theme),[s,l]=Object(n.useState)(e.options.insertSpaces);return r.a.createElement("div",{className:"editor-options-container noselect"},r.a.createElement("div",{className:"editor-options-line"},r.a.createElement("p",null,"Theme: "),r.a.createElement("select",{className:"dropdown",onChange:e=>a(e.target.value),defaultValue:t},r.a.createElement("option",{value:"vs-dark"},"vs-dark"),r.a.createElement("option",{value:"light"},"light"))),r.a.createElement("div",{className:"editor-options-line"},r.a.createElement("p",null,"Use whitespace over tabs: "),r.a.createElement("input",{type:"checkbox",onChange:e=>l(e.target.checked),checked:s})),r.a.createElement("br",null),r.a.createElement(i.a,{style:{width:"50px"},text:"Save",onClick:function(){e.save({theme:t,insertSpaces:s}),Object(o.b)(e.id)}}))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(540),r=a(0);function i(e){const t=function(e,t){let a=-1;for(let n=0;n{if(n<=t+1)return r.createElement("ul",{key:n},r.createElement("p",null,"[",a.fulfilled(e.player)?"x":" ","] ",a.title))});return r.createElement("div",{className:"milestones-container"},r.createElement("h1",null,"Milestones"),r.createElement("p",null,"Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset when you install Augmentations."),r.createElement("br",null),r.createElement("h2",null,"Completing fl1ght.exe"),r.createElement("li",null,a))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(30),o=a(396),s=a(67),l=a(354),c=a(214),u=a(397),m=a(215),h=a(243),p=a(1009);function d({terminal:e}){return r.a.createElement(i.a,{color:"primary",paragraph:!1},e.getProgressText())}const f=Object(c.a)(e=>Object(u.a)({nopadding:{padding:e.spacing(0)},preformatted:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0)},list:{padding:e.spacing(0),height:"100%"}}));function g({terminal:e,engine:t,player:a}){const c=Object(n.useRef)(null),u=Object(n.useState)(!1)[1];function g(){const e=c.current;null!==e&&setTimeout(()=>e.scrollIntoView(!0),50)}Object(n.useEffect)(()=>{const t=setInterval(()=>{e.pollChanges()&&u(e=>!e)},100);return()=>clearInterval(t)},[]),g(),Object(n.useEffect)(()=>{setTimeout(g,50)},[]);const y=f();return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{width:"100%",minHeight:"100vh",px:1,display:"flex",alignItems:"flex-end"},r.a.createElement(o.a,{classes:{root:y.list}},e.outputHistory.map((t,n)=>t instanceof h.b?r.a.createElement(s.a,{key:n,classes:{root:y.nopadding}},r.a.createElement(i.a,{classes:{root:y.preformatted},color:t.color,paragraph:!1},t.text)):t instanceof h.a?r.a.createElement(s.a,{key:n,classes:{root:y.nopadding}},r.a.createElement(l.a,{classes:{root:y.preformatted},color:"secondary",paragraph:!1,onClick:()=>e.connectToServer(a,t.hostname)},"> ",t.hostname)):void 0),null!==e.action&&r.a.createElement(s.a,{classes:{root:y.nopadding}},r.a.createElement(d,{terminal:e})," ")),r.a.createElement("div",{ref:c})),r.a.createElement(m.a,{position:"sticky",bottom:0,width:"100%",px:1},r.a.createElement(p.a,{player:a,engine:t,terminal:e})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(30),o=a(214),s=a(397),l=a(395),c=a(286),u=a(73),m=a(1010),h=a(1012),p=a(63);const d=Object(o.a)(e=>Object(s.a)({textfield:{margin:0,width:"100%"},input:{backgroundColor:"#000"},nopadding:{padding:0},preformatted:{whiteSpace:"pre-wrap",margin:0},list:{padding:0,height:"100%"}}));let f="";function g({terminal:e,engine:t,player:a}){const o=Object(n.useRef)(null),[s,g]=Object(n.useState)(f),[y,b]=Object(n.useState)([]),E=d();function v(e){f=e,g(e)}function k(e){const t=o.current;if(!t)return;const a=s.length,n=t.selectionStart;if(null!==n)switch(e.toLowerCase()){case"home":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(a,a);break;case"prevchar":n>0&&t.setSelectionRange(n-1,n-1);break;case"prevword":for(let e=n-2;e>=0;--e)if(" "===t.value.charAt(e))return void t.setSelectionRange(e+1,e+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(n+1,n+1);break;case"nextword":for(let e=n+1;e<=a;++e)if(" "===t.value.charAt(e))return void t.setSelectionRange(e,e);t.setSelectionRange(a,a);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}return Object(n.useEffect)(()=>{function t(t){if(e.contractOpen)return;if(t.metaKey||t.ctrlKey)return;const n=o.current;n&&n.focus(),t.keyCode===u.a.C&&t.ctrlKey&&e.finishAction(a,!0)}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)}),r.a.createElement(r.a.Fragment,null,y.length>0&&r.a.createElement(c.a,{square:!0},r.a.createElement(i.a,{classes:{root:E.preformatted},color:"primary",paragraph:!1},"Possible autocomplete candidate:"),r.a.createElement(i.a,{classes:{root:E.preformatted},color:"primary",paragraph:!1},y.join(" "))),r.a.createElement(l.a,{variant:"standard",color:null===e.action?"primary":"secondary",autoFocus:!0,disabled:null!==e.action,autoComplete:"off",classes:{root:E.textfield},value:s,onChange:function(e){v(e.target.value),b([])},inputRef:o,InputProps:{id:"terminal-input",className:E.input,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{color:null===e.action?"primary":"secondary",flexShrink:0},"[",a.getCurrentServer().hostname," ~",e.cwd(),"]> ")),spellCheck:!1,onKeyDown:function(n){if(n.keyCode===u.a.ENTER&&""!==s)return n.preventDefault(),e.print(`[${a.getCurrentServer().hostname} ~${e.cwd()}]> ${s}`),e.executeCommands(t,a,s),void v("");if(n.keyCode===u.a.TAB&&""!==s){n.preventDefault();let t=s;const r=t.lastIndexOf(";");-1!==r&&(t=t.slice(r+1)),t=t.trim(),t=t.replace(/\s\s+/g," ");const i=t.split(" ");let o=i.length-2;o<-1&&(o=0);const l=Object(m.a)(a,t,o,e.cwd());if(0==l.length)return;let c="",u="";if(0==i.length)return;1==i.length?u=i[0]:2==i.length?(u=i[0],c=i[1]):3==i.length?(u=i[0]+" "+i[1],c=i[2]):(c=i.pop()+"",u=i.join(" "));const p=Object(h.a)(u,c,l,s);"string"==typeof p&&""!==p&&v(p),Array.isArray(p)&&b(p)}if(n.keyCode===u.a.L&&n.ctrlKey&&(n.preventDefault(),e.clear()),n.keyCode===u.a.UPARROW||p.a.ENABLE_BASH_HOTKEYS&&n.keyCode===u.a.P&&n.ctrlKey){p.a.ENABLE_BASH_HOTKEYS&&n.preventDefault();const t=e.commandHistoryIndex,a=e.commandHistory.length;if(0==a)return;(t<0||t>a)&&(e.commandHistoryIndex=a),0!=t&&--e.commandHistoryIndex;v(e.commandHistory[e.commandHistoryIndex]);const r=o.current;r&&setTimeout((function(){r.selectionStart=r.selectionEnd=1e4}),10)}if(n.keyCode===u.a.DOWNARROW||p.a.ENABLE_BASH_HOTKEYS&&n.keyCode===u.a.M&&n.ctrlKey){p.a.ENABLE_BASH_HOTKEYS&&n.preventDefault();const t=e.commandHistoryIndex,a=e.commandHistory.length;if(0==a)return;if((t<0||t>a)&&(e.commandHistoryIndex=a),t==a||t==a-1)e.commandHistoryIndex=a,v("");else{++e.commandHistoryIndex;v(e.commandHistory[e.commandHistoryIndex])}}p.a.ENABLE_BASH_HOTKEYS&&(n.keyCode===u.a.A&&n.ctrlKey&&(n.preventDefault(),k("home")),n.keyCode===u.a.E&&n.ctrlKey&&(n.preventDefault(),k("end")),n.keyCode===u.a.B&&n.ctrlKey&&(n.preventDefault(),k("prevchar")),n.keyCode===u.a.B&&n.altKey&&(n.preventDefault(),k("prevword")),n.keyCode===u.a.F&&n.ctrlKey&&(n.preventDefault(),k("nextchar")),n.keyCode===u.a.F&&n.altKey&&(n.preventDefault(),k("nextword")),n.keyCode!==u.a.H&&n.keyCode!==u.a.D||!n.ctrlKey||(!function(e){const t=o.current;if(!t)return;const a=s.length,n=t.selectionStart;if(null===n)return;const r=t.value;switch(e.toLowerCase()){case"backspace":n>0&&n<=a+1&&v(r.substr(0,n-1)+r.substr(n));break;case"deletewordbefore":for(let e=n-1;e>0;--e)if(" "===r.charAt(e))return void v(r.substr(0,e)+r.substr(n));break;case"deletewordafter":for(let e=n+1;e<=s.length+1;++e)if(" "===r.charAt(e))return void v(r.substr(0,n)+r.substr(e))}}("backspace"),n.preventDefault()))}}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(88),r=a(1011),i=a(89),o=a(221),s=a(95),l=a(27);const c=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","download","expr","free","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan","scan-analyze","scp","sudov","tail","theme","top"];function u(e,t,a,u=""){let m=[];m=m.concat(Object.keys(i.b));const h=e.getCurrentServer(),p=e.getHomeComputer();let d="",f=null;function g(){for(const e of h.contracts)m.push(e.fn)}function y(){for(const e of h.messages)e instanceof s.a||m.push(e)}function b(){for(const e of p.programs)m.push(e)}function E(){for(const e of h.scripts){const t=_(e.filename);t&&m.push(t)}}function v(){for(const e of h.textFiles){const t=_(e.fn);t&&m.push(t)}}function k(){const e=Object(r.a)(h,null==f?"/":f);for(let t=0;t=0;--t)a[t].toLowerCase().startsWith(e.toLowerCase())||a.splice(t,1);else for(let e=a.length-1;e>=0;--e)a[e].toLowerCase().startsWith(t.toLowerCase())||a.splice(e,1);const i=r.lastIndexOf(";");let o="";if(0!==a.length){if(1===a.length)return o=""===t?a[0]+" ":e+" "+a[0],-1===i?o:r.slice(0,i+1)+" "+o;{const o=Object(n.e)(a);return""===t?o===e?a:-1===i?o:`${r.slice(0,i+1)} ${o}`:o===t?a:-1==i?`${e} ${o}`:`${r.slice(0,i+1)} ${e} ${o}`}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"Tutorial (AKA Links to Documentation)"),r.a.createElement("a",{id:"tutorial-getting-started-link",className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html"},"Getting Started"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html"},"Servers & Networking"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html"},"Hacking"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html"},"Scripts"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript.html"},"Netscript Programming Language"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html"},"Traveling"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html"},"Companies"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html"},"Infiltration"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html"},"Factions"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html"},"Augmentations"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/shortcuts.html"},"Keyboard Shortcuts"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(2),o=a(165),s=a(9),l=a(12),c=a(6),u=a(50),m=a(170),h=a(28),p=a(184),d=a(11);function f(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}function f(e){const t=[["Total:",r.a.createElement(d.a,{money:e.total})]];return e.bladeburner&&t.push(["Bladeburner:",r.a.createElement(d.a,{money:e.bladeburner})]),e.codingcontract&&t.push(["Coding Contracts:",r.a.createElement(d.a,{money:e.codingcontract})]),e.work&&t.push(["Company Work:",r.a.createElement(d.a,{money:e.work})]),e.class&&t.push(["Class:",r.a.createElement(d.a,{money:e.class})]),e.corporation&&t.push(["Corporation:",r.a.createElement(d.a,{money:e.corporation})]),e.crime&&t.push(["Crimes:",r.a.createElement(d.a,{money:e.crime})]),e.gang&&t.push(["Gang:",r.a.createElement(d.a,{money:e.gang})]),e.hacking&&t.push(["Hacking:",r.a.createElement(d.a,{money:e.hacking})]),e.hacknetnode&&t.push(["Hacknet Nodes:",r.a.createElement(d.a,{money:e.hacknetnode})]),e.hospitalization&&t.push(["Hospitalization:",r.a.createElement(d.a,{money:e.hospitalization})]),e.infiltration&&t.push(["Infiltration:",r.a.createElement(d.a,{money:e.infiltration})]),e.stock&&t.push(["Stock Market:",r.a.createElement(d.a,{money:e.stock})]),e.casino&&t.push(["Casino:",r.a.createElement(d.a,{money:e.casino})]),e.sleeves&&t.push(["Sleeves:",r.a.createElement(d.a,{money:e.sleeves})]),Object(p.a)(t)}function g(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("table",null,r.a.createElement("tbody",null,e.rows.map(e=>r.a.createElement("tr",{key:e[0]},r.a.createElement("td",{key:"0"},e[0]+" multiplier:"),r.a.createElement("td",{key:"1",style:{textAlign:"right",paddingLeft:"5px"}},i.a.formatPercentage(e[1])),function(e){return u.a[5]>0&&e.length>2&&e[1]!=e[2]?r.a.createElement("td",{key:"2",style:{textAlign:"right"}}," ","(",i.a.formatPercentage(e[2]),")"):r.a.createElement(r.a.Fragment,null)}(e))))))}Object(n.useEffect)(()=>{const e=setInterval(a,20);return()=>clearInterval(e)},[]);const y=[["Time played since last Augmentation:",Object(l.b)(e.player.playtimeSinceLastAug)]];return e.player.sourceFiles.length>0&&y.push(["Time played since last Bitnode destroyed:",Object(l.b)(e.player.playtimeSinceLastBitnode)]),y.push(["Total Time played:",Object(l.b)(e.player.totalPlaytime)]),r.a.createElement(r.a.Fragment,null,r.a.createElement("pre",null,r.a.createElement("b",null,"General"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("span",null,"Current City: ",e.player.city),r.a.createElement("br",null),r.a.createElement((function(){return e.player.companyName?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Employer at which you last worked: ",e.player.companyName),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement((function(){return""!==e.player.companyName?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Job you last worked: ",e.player.jobs[e.player.companyName]),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement((function(){return e.player.jobs&&0!==Object.keys(e.player.jobs).length?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"All Employers:"),r.a.createElement("br",null),r.a.createElement("ul",null,Object.keys(e.player.jobs).map(e=>r.a.createElement("li",{key:e}," * ",e))),r.a.createElement("br",null),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement("span",null,"Money: ",r.a.createElement(d.a,{money:e.player.money.toNumber()})),r.a.createElement("button",{className:"popup-box-button",style:{display:"inline-block",float:"none"},onClick:function(){let t=r.a.createElement(r.a.Fragment,null,r.a.createElement("u",null,"Money earned since you last installed Augmentations:"),r.a.createElement("br",null),f(e.player.moneySourceA));0!==e.player.sourceFiles.length&&(t=r.a.createElement(r.a.Fragment,null,t,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("u",null,"Money earned in this BitNode:"),r.a.createElement("br",null),f(e.player.moneySourceB))),Object(s.a)(t,!1)}},"Money Statistics & Breakdown"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("b",null,"Stats"),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",{key:"0"},r.a.createElement("td",{key:"0"},"Hacking:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.hacking_skill)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.hacking_exp)," exp)")),r.a.createElement("tr",{key:"1"},r.a.createElement("td",{key:"0"},"Strength:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.strength)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.strength_exp)," exp)")),r.a.createElement("tr",{key:"2"},r.a.createElement("td",{key:"0"},"Defense:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.defense)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.defense_exp)," exp)")),r.a.createElement("tr",{key:"3"},r.a.createElement("td",{key:"0"},"Dexterity:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.dexterity)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.dexterity_exp)," exp)")),r.a.createElement("tr",{key:"4"},r.a.createElement("td",{key:"0"},"Agility:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.agility)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.agility_exp)," exp)")),r.a.createElement("tr",{key:"5"},r.a.createElement("td",{key:"0"},"Charisma:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.charisma)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.charisma_exp)," exp)")),r.a.createElement((function(){return e.player.intelligence>0&&(5===e.player.bitNodeN||u.a[5]>0)?r.a.createElement("tr",{key:"5"},r.a.createElement("td",null,"Intelligence:"),r.a.createElement("td",{style:{textAlign:"right"}},i.a.formatSkill(e.player.intelligence))):r.a.createElement(r.a.Fragment,null)}),null))),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Hacking Chance",e.player.hacking_chance_mult],["Hacking Speed",e.player.hacking_speed_mult],["Hacking Money",e.player.hacking_money_mult,e.player.hacking_money_mult*c.a.ScriptHackMoney],["Hacking Growth",e.player.hacking_grow_mult,e.player.hacking_grow_mult*c.a.ServerGrowthRate]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Hacking Level",e.player.hacking_mult,e.player.hacking_mult*c.a.HackingLevelMultiplier],["Hacking Experience",e.player.hacking_exp_mult,e.player.hacking_exp_mult*c.a.HackExpGain]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Strength Level",e.player.strength_mult,e.player.strength_mult*c.a.StrengthLevelMultiplier],["Strength Experience",e.player.strength_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Defense Level",e.player.defense_mult,e.player.defense_mult*c.a.DefenseLevelMultiplier],["Defense Experience",e.player.defense_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Dexterity Level",e.player.dexterity_mult,e.player.dexterity_mult*c.a.DexterityLevelMultiplier],["Dexterity Experience",e.player.dexterity_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Agility Level",e.player.agility_mult,e.player.agility_mult*c.a.AgilityLevelMultiplier],["Agility Experience",e.player.agility_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Charisma Level",e.player.charisma_mult,e.player.charisma_mult*c.a.CharismaLevelMultiplier],["Charisma Experience",e.player.charisma_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Hacknet Node production",e.player.hacknet_node_money_mult,e.player.hacknet_node_money_mult*c.a.HacknetNodeMoney],["Hacknet Node purchase cost",e.player.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.player.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.player.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.player.hacknet_node_level_cost_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Company reputation gain",e.player.company_rep_mult],["Faction reputation gain",e.player.faction_rep_mult,e.player.faction_rep_mult*c.a.FactionWorkRepGain],["Salary",e.player.work_money_mult,e.player.work_money_mult*c.a.CompanyWorkMoney]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Crime success",e.player.crime_success_mult],["Crime money",e.player.crime_money_mult,e.player.crime_money_mult*c.a.CrimeMoney]]}),r.a.createElement("br",null),r.a.createElement((function(){return e.player.canAccessBladeburner()?r.a.createElement(r.a.Fragment,null,r.a.createElement(g,{rows:[["Bladeburner Success Chance",e.player.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.player.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.player.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.player.bladeburner_success_chance_mult]]}),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement("br",null),r.a.createElement("b",null,"Misc."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("span",null,`Servers owned: ${e.player.purchasedServers.length} / ${Object(m.b)()}`),r.a.createElement("br",null),r.a.createElement((function(){return 9===e.player.bitNodeN||u.a[9]>0?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,`Hacknet Servers owned: ${e.player.hacknetNodes.length} / ${h.b.MaxServers}`),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Hacknet Nodes owned: "+e.player.hacknetNodes.length),r.a.createElement("br",null))}),null),r.a.createElement("span",null,"Augmentations installed: "+e.player.augmentations.length),r.a.createElement("br",null),r.a.createElement("br",null),Object(p.a)(y),r.a.createElement("br",null),r.a.createElement((function(){if(e.player.sourceFiles.length>0){const t="BitNode"+e.player.bitNodeN;return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Current BitNode: ",e.player.bitNodeN," (",o.a[t].name,")"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("div",{style:{width:"60%",fontSize:"13px",marginLeft:"2%"}},r.a.createElement("span",{style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},o.a[t].info)))}return r.a.createElement(r.a.Fragment,null)}),null)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(1016),o=a(1017);function s(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,20);return()=>clearInterval(e)},[]),r.a.createElement("div",{className:"active-scripts-container"},r.a.createElement("p",null,"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running."),r.a.createElement(i.a,e),r.a.createElement(o.a,e))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(11);function i(e){const t=e.p.scriptProdSinceLastAug/(e.p.playtimeSinceLastAug/1e3);let a=0;for(const t of e.workerScripts.values())a+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return n.createElement("p",{id:"active-scripts-total-prod"},"Total online production of Active scripts: ",n.createElement("span",{className:"money-gold"},n.createElement("span",{id:"active-scripts-total-production-active"},n.createElement(r.a,{money:a}))," ","/ sec"),n.createElement("br",null),"Total online production since last Aug installation: ",n.createElement("span",{id:"active-scripts-total-prod-aug-total",className:"money-gold"},n.createElement(r.a,{money:e.p.scriptProdSinceLastAug}))," (",n.createElement("span",{className:"money-gold"},n.createElement("span",{id:"active-scripts-total-prod-aug-avg",className:"money-gold"},n.createElement(r.a,{money:t}))," ","/ sec"),")")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(1018),i=a(207),o=a(35);class s extends n.Component{constructor(e){var t,a,n;super(e),n={},(a="serverToScriptMap")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.state={rerenderFlag:!1},this.updateServerToScriptsMap(),this.rerender=this.rerender.bind(this)}componentDidMount(){i.a.addSubscriber({cb:this.rerender,id:"ActiveScriptsUI"})}componentWillUnmount(){i.a.removeSubscriber("ActiveScriptsUI")}updateServerToScriptsMap(){const e={};for(const t of this.props.workerScripts.values()){const a=Object(o.b)(t.serverIp);null!=a?(null==e[a.hostname]&&(e[a.hostname]={server:a,workerScripts:[]}),e[a.hostname].workerScripts.push(t)):console.warn("WorkerScript has invalid IP address: "+t.serverIp)}this.serverToScriptMap=e}rerender(){this.updateServerToScriptsMap(),this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=Object.keys(this.serverToScriptMap).map(e=>{const t=this.serverToScriptMap[e];return n.createElement(r.a,{key:e,server:t.server,workerScripts:t.workerScripts})});return n.createElement("ul",{className:"active-scripts-list",id:"active-scripts-list"},e)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(163),i=a(1019),o=a(140);function s(e){const t=e.server,a=`${t.hostname}${" ".repeat(18)}`.slice(0,Math.max(t.hostname.length,18)),s={progress:t.ramUsed/t.maxRam,totalTicks:30},l=`${a} ${Object(o.a)(s)}`;return n.createElement(r.a,{headerContent:n.createElement("pre",null,l),panelContent:n.createElement(i.a,{workerScripts:e.workerScripts})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(541),o=a(279);function s(e){if(e.workerScripts.length>20)return r.a.createElement(l,{workerScripts:e.workerScripts});const t=e.workerScripts.map(e=>r.a.createElement(i.a,{key:`${e.name}_${e.args}`,workerScript:e}));return r.a.createElement("ul",null,t)}function l(e){const[t,a]=Object(n.useState)(0),s=[],l=Math.ceil(e.workerScripts.length/20),c=Math.min(20*(t+1),e.workerScripts.length);for(let a=20*t;a(t+=e,u(t=Math.round(t))))}return m!==t&&a(m),r.a.createElement(r.a.Fragment,null,r.a.createElement("ul",null,s),r.a.createElement(o.a,{onClick:()=>h(-1e99),text:"<<"}),r.a.createElement(o.a,{onClick:()=>h(-1),text:"<"}),r.a.createElement("span",{className:"text"},t+1," / ",l),r.a.createElement(o.a,{onClick:()=>h(1),text:">"}),r.a.createElement(o.a,{onClick:()=>h(1e99),text:">>"}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";var n=a(1),r=a(216);setInterval((function(){"5.5e+1"!==55..toExponential()&&n.a.giveExploit(r.a.PrototypeTampering)}),9e5)},function(e,t,a){"use strict";var n=a(1),r=a(216);!function(){function e(e){if(!(e.target&&e.target instanceof Element))return;"none"===window.getComputedStyle(e.target).display&&e.isTrusted&&n.a.giveExploit(r.a.Unclickable)}document.addEventListener("DOMContentLoaded",(function t(){const a=document.getElementById("unclickable");null!=a?(a.addEventListener("click",e),document.removeEventListener("DOMContentLoaded",t)):console.error("Could not find the unclickable elem for the related exploit.")}))}()}]); + */r.PARSE_OPTIONS={ecmaVersion:5,locations:!0},r.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},r.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},r.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},r.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},r.STEP_ERROR={},r.SCOPE_REFERENCE={},r.VALUE_IN_DESCRIPTOR={},r.toStringCycles_=[],r.prototype.getErrorLineNumber=function(e){var t=this.sourceCode;if(null==e||null==e.start)return NaN;try{return((t=t.substring(0,e.start)).match(/\n/g)||[]).length+1-this.sourceCodeLineOffset}catch(e){return NaN}},r.prototype.getErrorLineNumberMessage=function(e){return isNaN(e)?" (Unknown line number)":e<=0?" (Error occurred in an imported function)":" (Line Number "+e+". This line number is probably incorrect if your script is importing any functions. This is being worked on)"},r.prototype.appendCode=function(e){var t=this.stateStack[0];if(!t||"Program"!==t.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof e&&(e=n.b(e,r.PARSE_OPTIONS)),!e||"Program"!==e.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(e,t.scope);for(var a,i=0;a=e.body[i];i++)t.node.body.push(a);t.done=!1},r.prototype.step=function(){var e=this.stateStack,t=e[e.length-1];if(!t)return!1;var a=t.node,n=a.type;if("Program"===n&&t.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[n](e,t,a)}catch(e){if(e!==r.STEP_ERROR)throw e}return i&&e.push(i),!!a.end||this.step()},r.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},r.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,r.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,r.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,r.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new r.Object(null),this.FUNCTION_PROTO=new r.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.initArray(e),this.initString(e),this.initBoolean(e),this.initNumber(e),this.initDate(e),this.initRegExp(e),this.initError(e),this.initMath(e),this.initJSON(e);var t=this,a=this.createNativeFunction((function(e){throw EvalError("Can't happen")}),!1);a.eval=!0,this.setProperty(e,"eval",a),this.setProperty(e,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(e,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(e,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(e,"isFinite",this.createNativeFunction(isFinite,!1));for(var n=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O && !callbackfn.call(T, O[k], k, O)) return false;","k++;","}","return true;","}","});","Object.defineProperty(Array.prototype, 'filter',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t) {","var val = t[i];","if (fun.call(thisArg, val, i, t)) res.push(val);","}","}","return res;","}","});","if (!Array.prototype.find) {","Object.defineProperty(Array.prototype, 'find', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return kValue;","}","k++;","}","return undefined;","},","configurable: true,","writable: true","});","}","if (!Array.prototype.findIndex) {","Object.defineProperty(Array.prototype, 'findIndex', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return k;","}","k++;","}","return -1;","},","configurable: true,","writable: true","});","}","Object.defineProperty(Array.prototype, 'forEach',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O) callback.call(T, O[k], k, O);","k++;","}","}","});","Object.defineProperty(Array.prototype, 'includes', {","value: function(searchElement, fromIndex) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","// 1. Let O be ? ToObject(this value).","var o = Object(this);",'// 2. Let len be ? ToLength(? Get(O, "length")).',"var len = o.length >>> 0;","// 3. If len is 0, return false.","if (len === 0) {","return false;","}","// 4. Let n be ? ToInteger(fromIndex).","// (If fromIndex is undefined, this step produces the value 0.)","var n = fromIndex | 0;","// 5. If n ≥ 0, then","// a. Let k be n.","// 6. Else n < 0,","// a. Let k be len + n.","// b. If k < 0, let k be 0.","var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","function sameValueZero(x, y) {","return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));","}","// 7. Repeat, while k < len","while (k < len) {","// a. Let elementK be the result of ? Get(O, ! ToString(k)).","// b. If SameValueZero(searchElement, elementK) is true, return true.","if (sameValueZero(o[k], searchElement)) {","return true;","}","// c. Increase k by 1. ","k++;","}","// 8. Return false","return false;","}","});","Object.defineProperty(Array.prototype, 'map',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') new TypeError;","var T, A, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","A = new Array(len);","k = 0;","while (k < len) {","if (k in O) A[k] = callback.call(T, O[k], k, O);","k++;","}","return A;","}","});","Object.defineProperty(Array.prototype, 'reduce',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var t = Object(this), len = t.length >>> 0, k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in t)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k++];","}","for (; k < len; k++) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'reduceRight',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var t = Object(this), len = t.length >>> 0, k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in t)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k--];","}","for (; k >= 0; k--) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'some',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t && fun.call(thisArg, t[i], i, t)) {","return true;","}","}","return false;","}","});","(function() {","var sort_ = Array.prototype.sort;","Array.prototype.sort = function(opt_comp) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp(this[j], this[j + 1]) > 0) {","var swap = this[j];","this[j] = this[j + 1];","this[j + 1] = swap;","changes++;","}","}","if (!changes) break;","}","return this;","};","})();","Object.defineProperty(Array.prototype, 'toLocaleString',","{configurable: true, writable: true, value:","function() {","var out = [];","for (var i = 0; i < this.length; i++) {","out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();","}","return out.join(',');","}","});","")},r.prototype.initString=function(e){var t,a=this;t=function(e){return e=String(e),a.calledWithNew()?(this.data=e,this):e},this.STRING=this.createNativeFunction(t,!0),this.setProperty(e,"String",this.STRING),this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),r.NONENUMERABLE_DESCRIPTOR);for(var n=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],i=0;i= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","if (!String.prototype.endsWith) {","String.prototype.endsWith = function(search, this_len) {","if (this_len === undefined || this_len > this.length) {","this_len = this.length;","}","return this.substring(this_len - search.length, this_len) === search;","};","}","if (!String.prototype.includes) {","String.prototype.includes = function(search, start) {","'use strict';","if (typeof start !== 'number') {","start = 0;","}"," ","if (start + search.length > this.length) {","return false;","} else {","return this.indexOf(search, start) !== -1;","}","};","}","if (!String.prototype.startsWith) {","String.prototype.startsWith = function(search, pos) {","return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;","};","}","")},r.prototype.initBoolean=function(e){var t,a=this;t=function(e){return e=Boolean(e),a.calledWithNew()?(this.data=e,this):e},this.BOOLEAN=this.createNativeFunction(t,!0),this.setProperty(e,"Boolean",this.BOOLEAN)},r.prototype.initNumber=function(e){var t,a=this;t=function(e){return e=Number(e),a.calledWithNew()?(this.data=e,this):e},this.NUMBER=this.createNativeFunction(t,!0),this.setProperty(e,"Number",this.NUMBER);for(var n=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],i=0;i>>0;return t===Number(e)?t:NaN},r.legalArrayIndex=function(e){var t=e>>>0;return String(t)===String(e)&&4294967295!==t?t:NaN},r.Value,r.Object=function(e){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=e},r.Object.prototype.proto=null,r.Object.prototype.isObject=!0,r.Object.prototype.class="Object",r.Object.prototype.data=null,r.Object.prototype.toString=function(){if("Array"===this.class){(n=r.toStringCycles_).push(this);try{for(var e=[],t=0;t0;i.pop()){var o=i[i.length-1];switch(o.node.type){case"TryStatement":return void(o.cv={type:e,value:t,label:a});case"CallExpression":case"NewExpression":if(e===r.Completion.RETURN)return void(o.value=t);if(e!==r.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(e===r.Completion.BREAK){if(a?o.labels&&-1!==o.labels.indexOf(a):o.isLoop||o.isSwitch)return void i.pop()}else if(e===r.Completion.CONTINUE&&(a?o.labels&&-1!==o.labels.indexOf(a):o.isLoop))return}var s;if(this.isa(t,this.ERROR)){var l={EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},c=this.getProperty(t,"name").toString(),u=this.getProperty(t,"message").valueOf();s=(e=l[c]||Error)(u+n)}else s=String(t)+n;throw s},r.prototype.createGetter_=function(e,t){var a=Array.isArray(t)?t[0]:t,n=new this.nodeConstructor;n.type="CallExpression";var i=new r.State(n,this.stateStack[this.stateStack.length-1].scope);return i.doneCallee_=!0,i.funcThis_=a,i.func_=e,i.doneArgs_=!0,i.arguments_=[],i},r.prototype.createSetter_=function(e,t,a){var n=Array.isArray(t)?t[0]:this.global,i=new this.nodeConstructor;i.type="CallExpression";var o=new r.State(i,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=n,o.func_=e,o.doneArgs_=!0,o.arguments_=[a],o},r.State=function(e,t){this.node=e,this.scope=t},r.prototype.stepArrayExpression=function(e,t,a){var n=a.elements,i=t.n_||0;for(t.array_?(this.setProperty(t.array_,i,t.value),i++):(t.array_=this.createObjectProto(this.ARRAY_PROTO),t.array_.properties.length=n.length);i>=":s>>=l;break;case">>>=":s>>>=l;break;case"&=":s&=l;break;case"^=":s^=l;break;case"|=":s|=l;break;default:throw SyntaxError("Unknown assignment expression: "+a.operator)}var c=this.setValue(t.leftReference_,s);if(c)return t.doneSetter_=!0,t.setterValue_=s,this.createSetter_(c,t.leftReference_,s);e.pop(),e[e.length-1].value=s},r.prototype.stepBinaryExpression=function(e,t,a){if(!t.doneLeft_)return t.doneLeft_=!0,new r.State(a.left,t.scope);if(!t.doneRight_)return t.doneRight_=!0,t.leftValue_=t.value,new r.State(a.right,t.scope);e.pop();var n,i=t.leftValue_,o=t.value;switch(a.operator){case"==":n=i==o;break;case"!=":n=i!=o;break;case"===":n=i===o;break;case"!==":n=i!==o;break;case">":n=i>o;break;case">=":n=i>=o;break;case"<":n=i>":n=i>>o;break;case">>>":n=i>>>o;break;case"in":if(!o||!o.isObject){let e=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+o+"'",e)}n=this.hasProperty(o,i);break;case"instanceof":if(!this.isa(o,this.FUNCTION)){let e=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object",e)}n=!!i.isObject&&this.isa(i,o);break;default:throw SyntaxError("Unknown binary operator: "+a.operator)}e[e.length-1].value=n},r.prototype.stepBlockStatement=function(e,t,a){var n=t.n_||0,i=a.body[n];if(i)return t.n_=n+1,new r.State(i,t.scope);e.pop()},r.prototype.stepBreakStatement=function(e,t,a){var n=a.label&&a.label.name;this.unwind(r.Completion.BREAK,void 0,n)},r.prototype.stepCallExpression=function(e,t,a){if(!t.doneCallee_){t.doneCallee_=1;var i=new r.State(a.callee,t.scope);return i.components=!0,i}if(1===t.doneCallee_){t.doneCallee_=2;var o=t.value;if(Array.isArray(o)){if(t.func_=this.getValue(o,a),o[0]===r.SCOPE_REFERENCE?t.directEval_="eval"===o[1]:t.funcThis_=o[0],(o=t.func_)&&"object"==typeof o&&o.isGetter)return o.isGetter=!1,t.doneCallee_=1,this.createGetter_(o,t.value)}else t.func_=o;t.arguments_=[],t.n_=0}o=t.func_;if(!t.doneArgs_){if(0!==t.n_&&t.arguments_.push(t.value),a.arguments[t.n_])return new r.State(a.arguments[t.n_++],t.scope);if("NewExpression"===a.type){if(o.illegalConstructor){let e=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,o+" is not a constructor",e)}var s=o.properties.prototype;"object"==typeof s&&null!==s||(s=this.OBJECT_PROTO),t.funcThis_=this.createObjectProto(s),t.isConstructor=!0}else void 0===t.funcThis_&&(t.funcThis_=t.scope.strict?void 0:this.global);t.doneArgs_=!0}if(t.doneExec_)e.pop(),t.isConstructor&&"object"!=typeof t.value?e[e.length-1].value=t.funcThis_:e[e.length-1].value=t.value;else{if(t.doneExec_=!0,!o||!o.isObject){let e=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,o+" is not a function",e)}var l=o.node;if(l){for(var c=this.createScope(l.body,o.parentScope),u=0;uu?t.arguments_[u]:void 0;this.setProperty(c,m,h)}var p=this.createObjectProto(this.ARRAY_PROTO);for(u=0;ue.name),o=[];function s(e){return e.name!==r.a.NeuroFluxGovernor&&(!a.includes(e.name)&&(!o.includes(e)&&!e.isSpecial))}if(t.inGang()){const e=t.getGangFaction();for(const t in n.a){const a=n.a[t];s(a)&&(e.playerReputation>a.baseRepRequirement&&o.push(a))}return o}for(const e of t.factions){if("Bladeburners"===e)continue;if("Netburners"===e)continue;const t=i.a[e];if(null!=t)for(const e of t.augmentations){const a=n.a[e];s(a)&&(t.playerReputation>a.baseRepRequirement&&o.push(a))}}return o}},function(e,t,a){"use strict";function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}a.d(t,"a",(function(){return r}));class r{constructor(e,t){n(this,"lvl",1),n(this,"n",1),this.n=e,this.lvl=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(163),i=a(4);function o(e){let t=e.aug.name;return null!=e.level&&e.aug.name===i.a.NeuroFluxGovernor&&(t+=" - Level "+e.level),"string"==typeof e.aug.info?n.createElement(r.a,{headerContent:n.createElement(n.Fragment,null,t),panelContent:n.createElement("p",null,n.createElement("span",{dangerouslySetInnerHTML:{__html:e.aug.info}}),n.createElement("br",null),n.createElement("br",null),e.aug.stats)}):n.createElement(r.a,{headerContent:n.createElement(n.Fragment,null,t),panelContent:n.createElement("p",null,e.aug.info,n.createElement("br",null),n.createElement("br",null),e.aug.stats)})}},,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(9);function s(e){const[t,a]=Object(n.useState)();return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of team members you would like to take on this Op. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."),r.a.createElement("input",{autoFocus:!0,type:"number",placeholder:"Team size",className:"text-input",onChange:e=>a(parseFloat(e.target.value))}),r.a.createElement("a",{className:"a-link-button",onClick:function(){if(void 0===t)return;const a=Math.round(t);isNaN(a)||a<0?Object(o.a)("Invalid value entered for number of Team Members (must be numeric, positive)"):e.action.teamCount=a,Object(i.b)(e.popupId)}},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(55);function r(e){const t=[];for(const a in n.a){const r=n.a[a].create;null!=r&&(e.hasProgram(n.a[a].name)||r.req(e)&&t.push(n.a[a]))}return t}},function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(921),r=a(18),i=a(259),o=a(4),s=a(16);function l(e,t){const a=e.getCost();if(!t.canAfford(a))return!1;t.loseMoney(a),t.hacking_exp=e.hacking_exp,t.strength_exp=e.strength_exp,t.defense_exp=e.defense_exp,t.dexterity_exp=e.dexterity_exp,t.agility_exp=e.agility_exp,t.charisma_exp=e.charisma_exp;for(const e in r.a)r.a[e].owned=!1;for(let e=t.augmentations.length-1;e>=0;--e)t.augmentations[e].name!==o.a.NeuroFluxGovernor?t.augmentations.splice(e,1):r.a[o.a.NeuroFluxGovernor].owned=!0;for(let a=0;a=0;--e){const a=t.queuedAugmentations[e].name;t.augmentations.filter(e=>e.name!==o.a.NeuroFluxGovernor&&e.name===a).length>=1&&t.queuedAugmentations.splice(e,1)}return t.reapplyAllAugmentations(!0),t.reapplyAllSourceFiles(),!0}function c(){const e=[];for(let t=0;t<40;++t){const a=new n.a,i=5*t+1;a.hacking_exp=i*Object(s.a)(1e3,5e3),a.strength_exp=i*Object(s.a)(1e3,5e3),a.defense_exp=i*Object(s.a)(1e3,5e3),a.dexterity_exp=i*Object(s.a)(1e3,5e3),a.agility_exp=i*Object(s.a)(1e3,5e3),a.charisma_exp=i*Object(s.a)(1e3,5e3);const l=Math.max(2,Math.ceil((t+3)/2)),c=Object(s.a)(l,l+2),u=Object.keys(r.a);for(let e=0;eObject(o.a)({modal:{display:"flex",alignItems:"center",justifyContent:"center"},paper:{backgroundColor:e.palette.background.paper,border:"2px solid "+e.palette.primary.main,boxShadow:e.shadows[5],padding:2,maxWidth:"80%",maxHeight:"80%",overflow:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}})),m=e=>{const t=u();return r.a.createElement(s.a,{open:e.open,onClose:e.onClose,closeAfterTransition:!0,className:t.modal,BackdropComponent:l.a,BackdropProps:{timeout:100}},r.a.createElement(c.a,{in:e.open},r.a.createElement("div",{className:t.paper},e.children)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){return r.a.createElement("span",{style:{fontSize:"1em"},className:"blinking-cursor"},"|")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(183);function i(e){return Object(r.a)(n.a.formatHashes(e)+" / sec")}},,function(e,t,a){"use strict";function n(e){function t(e,t,a){return e*t+a}const a=t(e,Math.log(51)-Math.log(50),Math.log(51));return t(500,Math.exp(a),-25e3)}function r(e){return-Math.log(25500/(e+25e3))/Math.log(1.02)}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return r}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(238),r=a(14);class i extends n.a{constructor(e=null){super(e)}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceContract}toJSON(){return Object(r.b)("Contract",this)}static fromJSON(e){return Object(r.a)(i,e.data)}}r.c.constructors.Contract=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={helpList:["Use 'help [command]' to get more information about a particular Bladeburner console command.",""," automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks"," clear/cls Clear the console"," help [cmd] Display this help text, or help text for a specific command"," log [en/dis] [type] Enable or disable logging for events and actions"," skill [action] [name] Level or display info about your Bladeburner skills"," start [type] [name] Start a Bladeburner action/task"," stop Stops your current Bladeburner action/task"],automate:["automate [var] [val] [hi/low]","","A simple way to automate your Bladeburner actions. This console command can be used to automatically start an action when your stamina rises above a certain threshold, and automatically switch to another action when your stamina drops below another threshold."," automate status - Check the current status of your automation and get a brief description of what it'll do"," automate en - Enable the automation feature"," automate dis - Disable the automation feature","","There are four properties that must be set for this automation to work properly. Here is how to set them:",""," automate stamina 100 high"," automate contract Tracking high"," automate stamina 50 low"," automate general 'Field Analysis' low","","Using the four console commands above will set the automation to perform Tracking contracts if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below 50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must exactly match whatever the name is in the UI."],clear:["clear","","Clears the console"],cls:["cls","","Clears the console"],help:["help [command]","","Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:",""," help automate","","will display specific information about using the automate console command"],log:["log [en/dis] [type]","","Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:","","[general, contracts, ops, blackops, events]","","The logging for these categories can be enabled or disabled like so:",""," log dis contracts - Disables logging that occurs when contracts are completed"," log en contracts - Enables logging that occurs when contracts are completed"," log dis events - Disables logging for Bladeburner random events","","Logging can be universally enabled/disabled using the 'all' keyword:",""," log dis all"," log en all"],skill:["skill [action] [name]","","Level or display information about your skills.","","To display information about all of your skills and your multipliers, use:",""," skill list","","To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:",""," skill list Reaper
skill list 'Digital Observer'","","This console command can also be used to level up skills:",""," skill level [skill name]"],start:["start [type] [name]","","Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:","","[general, contract, op, blackop]","","Examples:",""," start contract Tracking"," start op 'Undercover Operation'"],stop:["stop","","Stop your current action and go idle."]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(271),r=a(2);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class o{constructor(e={cost:0,text:""}){if(i(this,"children",[]),i(this,"cost",0),i(this,"researched",!1),i(this,"parent",null),i(this,"text",""),null==n.a[e.text])throw new Error("Invalid Research name used when constructing ResearchTree Node: "+e.text);this.text=e.text,this.cost=e.cost,e.children&&e.children.length>0&&(this.children=e.children),null!=e.parent&&(this.parent=e.parent)}addChild(e){this.children.push(e),e.parent=this}createTreantMarkup(){const e=[];for(let t=0;t${this.text}
${r.a.format(this.cost,"0,0")} Scientific Research`+a.desc+"",text:{name:this.text}}}findNode(e){if(this.text===e)return this;let t=null;for(let a=0;a{t.innerText="",t.style.display="none",t.classList.remove("status-text")},3e3)}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){let t="cmpy-mgmt-header-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick},e.text)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(963),i=a(964),o=a(101),s=a(328),l=a(40),c=a(5),u=a(9);class m extends n.Component{constructor(e){super(e),this.state={city:e.p.city,inCity:null==e.initiallyInCity||e.initiallyInCity,location:e.p.location},this.enterLocation=this.enterLocation.bind(this),this.returnToCity=this.returnToCity.bind(this),this.travel=this.travel.bind(this)}enterLocation(e){this.props.p.gotoLocation(e),this.setState({inCity:!1,location:e})}returnToCity(){this.setState({inCity:!0})}renderCity(){const e=o.a[this.state.city];if(null==e)throw new Error("Invalid city when rendering UI: "+this.state.city);return n.createElement("div",{className:"noselect"},n.createElement("h2",null,this.state.city),n.createElement(r.a,{city:e,enterLocation:this.enterLocation}))}renderLocation(){const e=s.a[this.state.location];if(null==e)throw new Error("Invalid location when rendering UI: "+this.state.location);return e.types.includes(l.a.StockMarket)&&this.props.engine.loadStockMarketContent(),n.createElement(i.a,{engine:this.props.engine,loc:e,p:this.props.p,returnToCity:this.returnToCity,travel:this.travel})}travel(e){const t=this.props.p,a=c.a.TravelCost;if(t.canAfford(a)){if(t.loseMoney(a),t.travel(e),Object(u.a)(n.createElement("span",{className:"noselect"},"You are now in ",e,"!")),!1===t.firstTimeTraveled){t.firstTimeTraveled=!0;const e=document.getElementById("travel-tab"),a=document.getElementById("world-menu-header");null!=e&&null!==a&&(e.style.display="list-item",a.click(),a.click())}this.props.p.travel(e)&&this.setState({inCity:!0,city:e})}else Object(u.a)("You cannot afford to travel to "+e)}render(){return this.state.inCity?this.renderCity():this.renderLocation()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(48),o=a(214);function s(){return(s=Object.assign||function(e){for(var t=1;tr.a.createElement(i.a,s({},e,{classes:{...l(),...e.classes}}))},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(16);const r={Tracking:()=>Object(n.a)(5,75)/10,"Bounty Hunter":()=>Object(n.a)(5,75)/10,Retirement:()=>Object(n.a)(5,75)/10,Investigation:()=>Object(n.a)(10,40)/10,"Undercover Operation":()=>Object(n.a)(10,40)/10,"Sting Operation":()=>Object(n.a)(3,40)/10,Raid:()=>Object(n.a)(2,40)/10,"Stealth Retirement Operation":()=>Object(n.a)(1,20)/10,Assassination:()=>Object(n.a)(1,20)/10}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(82),r=a(205);function i(e){if(null!==e)try{const t=Object(n.a)(e)?Object(r.a)(e):e;if(t instanceof Element)for(;null!==t.firstChild;)t.removeChild(t.firstChild)}catch(e){return void console.debug(e)}}},function(e,t,a){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(5);function r(e,t){return e/n.a.DonateMoneyToRepDivisor*t.faction_rep_mult}},function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"a",(function(){return o}));var n=a(89);function r(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}function i(e){const t=(e=(e=e.trim()).replace(/\s\s+/g," ")).match(/(?:'[^']*'|"[^"]*"|[^;"])*/g);if(!t)return[];const a=t.map(n.h).map(e=>e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat(),r=[];for(const e of a)null!==e&&(e.match(/^\s*$/)||r.push(e.trim()));return r}function o(e){let t="";const a=[];let n=0,i=0,o="";for(;i=1&&(o=e.charAt(i-1),"\\"===o&&(s=!0));const l=e.charAt(i);if('"'===l)if(s||" "!==o)""===t?t='"':'"'===t&&(t="");else{const t=e.indexOf('"',i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(i+1,t-i-1)),n=i=t===e.length-1?t+1:t+2;continue}}else if("'"===l)if(s||" "!==o)""===t?t="'":"'"===t&&(t="");else{const t=e.indexOf("'",i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(i+1,t-i-1)),n=i=t===e.length-1?t+1:t+2;continue}}else if(" "===l&&""===t){const t=e.substr(n,i-n);r(t)?a.push(parseFloat(t)):a.push(t),n=i+1}++i}if(n!==i){const t=e.substr(n,i-n);r(t)?a.push(parseFloat(t)):a.push(t)}return a}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(2);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of free command. Usage: free");const o=n.a.formatRAM(a.getCurrentServer().maxRam),s=n.a.formatRAM(a.getCurrentServer().ramUsed),l=n.a.formatRAM(a.getCurrentServer().maxRam-a.getCurrentServer().ramUsed),c=Math.max(o.length,Math.max(s.length,l.length)),u=n.a.formatPercentage(a.getCurrentServer().ramUsed/a.getCurrentServer().maxRam);e.print(`Total: ${" ".repeat(c-o.length)}${o}`),e.print(`Used: ${" ".repeat(c-s.length)}${s} (${u})`),e.print(`Available: ${" ".repeat(c-l.length)}${l}`)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(95),r=a(88);function i(e,t,a,i,o){const s=o.length;function l(){e.error("Incorrect usage of ls command. Usage: ls [dir] [| grep pattern]")}if(s>5||3===s)return l();let c="",u=e.cwd();if(u.endsWith("/")||(u+="/"),s>=4){if("grep"!==o[s-1]||"|"!==o[s-2])return l();c=o[s]+""}if(s>=2&&"|"!==o[0]){const t=Object(r.a)(o[0]+"",e.cwd());if(u=t||"",null!=u&&(u.endsWith("/")||(u+="/"),!Object(r.f)(u)))return l()}"/"===u&&(u="");const m=[],h=[],p=[],d=[],f=[],g=[];function y(e,t){let a=e;if(u){if(!e.startsWith(u))return;a=e.slice(u.length,e.length)}if(!c||a.includes(c))if(a.includes("/")){const e=Object(r.d)(a);if(c&&!e.includes(c))return;g.includes(e)||g.push(e)}else t.push(a)}const b=a.getCurrentServer();for(const e of b.programs)y(e,m);for(const e of b.scripts)y(e.filename,h);for(const e of b.textFiles)y(e.fn,p);for(const e of b.contracts)y(e.fn,d);for(const e of b.messages)e instanceof n.a?y(e.filename,f):y(e,f);function E(t){const a=Math.max(...t.map(e=>e.length))+1,n=Math.floor(80/a);for(let r=0;re.segments.length>0);for(let t=0;t{const a=Object(n.c)(o,t);if(null===a)throw new Error("Server should not be null");return{hostname:a.hostname,ip:a.ip,hasRoot:a.hasAdminRights?"Y":"N"}});s.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const l=Math.max(...s.map(e=>e.hostname.length)),c=Math.max(...s.map(e=>e.ip.length));for(const t of s){if(!t)continue;let a=t.hostname;a+=" ".repeat(l-t.hostname.length+1),a+=t.ip,a+=" ".repeat(c-t.ip.length+1),a+=t.hasRoot,e.print(a)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(77),r=a(53),i=a(14);class o{constructor(e="",t=0,a=0,i=n.a.LimitBuy,o=r.a.Long){let s=!1;if("number"==typeof t&&"number"==typeof a||(s=!0),(isNaN(t)||isNaN(a))&&(s=!0),"string"!=typeof e&&(s=!0),s)throw new Error("Invalid constructor paramters for Order");this.stockSymbol=e,this.shares=t,this.price=a,this.type=i,this.pos=o}toJSON(){return Object(i.b)("Order",this)}static fromJSON(e){return Object(i.a)(o,e.data)}}i.c.constructors.Order=o},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(66);const r={longestName:0,longestSymbol:0};for(const e in n.a)r.longestName=Math.max(e.length,r.longestName),r.longestSymbol=Math.max(n.a[e].length,r.longestSymbol)},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(709);function o(e){const[t,a]=Object(n.useState)(0);return r.a.createElement(r.a.Fragment,null,e.lines.slice(0,t).map((e,t)=>r.a.createElement("pre",{key:t},e)),e.lines.length>t&&r.a.createElement(i.a,{key:t,text:e.lines[t],onDone:function(){const n=t+1;a(n),n>=e.lines.length&&e.onDone&&e.onDone()}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(7);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class i{constructor(e){r(this,"city",null),r(this,"costMult",0),r(this,"expMult",0),r(this,"name",n.a.Void),r(this,"types",[]),r(this,"techVendorMaxRam",0),r(this,"techVendorMinRam",0),e.city&&(this.city=e.city),e.costMult&&(this.costMult=e.costMult),e.expMult&&(this.expMult=e.expMult),e.infiltrationData&&(this.infiltrationData=e.infiltrationData),e.name&&(this.name=e.name),e.types&&(this.types=e.types),e.techVendorMaxRam&&(this.techVendorMaxRam=e.techVendorMaxRam),e.techVendorMinRam&&(this.techVendorMinRam=e.techVendorMinRam)}}},,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){let t="cmpy-mgmt-city-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick},e.name)}},function(e,t,a){"use strict";function n(e){return null==e||e.options.length<=0||e.selectedIndex<0?"":e.options[e.selectedIndex].text}a.d(t,"a",(function(){return n}))},,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(27),o=a(90),s=a(85);const l={All:0,Foreign:1,Owned:2,Purchased:3};function c(e){function t(t){const a=t instanceof o.a&&t.purchasedByPlayer,n=e.serverType;switch(n){case l.All:return!0;case l.Foreign:return"home"!==t.hostname&&!a;case l.Owned:return a||t instanceof s.a||"home"===t.hostname;case l.Purchased:return a||t instanceof s.a;default:return console.warn("Invalid ServerType specified for ServerDropdown component: "+n),!1}}const a=[];for(const e in i.b){const n=i.b[e];t(n)&&a.push(r.a.createElement("option",{key:n.hostname,value:n.hostname},n.hostname))}return r.a.createElement("select",{className:"dropdown",onChange:e.onChange,style:e.style},a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(189);const o=({card:e,hidden:t})=>{let a;switch(e.suit){case i.b.Clubs:a=r.a.createElement("span",null,"♣");break;case i.b.Diamonds:a=r.a.createElement("span",null,"♦");break;case i.b.Hearts:a=r.a.createElement("span",null,"♥");break;case i.b.Spades:a=r.a.createElement("span",null,"♠");break;default:throw new Error("MissingCaseException: "+e.suit)}return r.a.createElement("div",{className:"casino-card "+(e.isRedSuit()?"red":"black")},r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"value"},t?" - ":e.formatValue()),r.a.createElement("div",{className:"suit"},t?" - ":a)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(286),o=a(214);function s(){return(s=Object.assign||function(e){for(var t=1;tr.a.createElement(i.a,s({},e,{classes:{...l(),...e.classes}}))},,function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=new class{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:-1,column:-1}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n="interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise;\n grow(ip: string, threads: number, stock: boolean): Promise;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise;\n installBackdoor(): Promise;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationPrereq(name: string): string[];\n getAugmentationPrice(name: string): number;\n getAugmentationRepReq(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}"},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(24),r=a(35);function i(e,t){const a=t.augmentations.slice().filter(e=>"NeuroFlux Governor"!==e);for(const t of a)if(!e.augmentations.some(e=>e.name==t))return!1;return!0}const o=[{title:"Gain root access on CSEC",fulfilled:()=>{const e=Object(r.a)("CSEC");return!(!e||!e.hasOwnProperty("hasAdminRights"))&&e.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const e=Object(r.a)("CSEC");return!(!e||!e.hasOwnProperty("backdoorInstalled"))&&e.backdoorInstalled}},{title:"Join the faction hinted at in csec-test.msg",fulfilled:e=>e.factions.includes("CyberSec")},{title:"Install all the Augmentations from CyberSec",fulfilled:e=>i(e,n.a.CyberSec)},{title:"Join the faction hinted at in nitesec-test.msg",fulfilled:e=>e.factions.includes("NiteSec")},{title:"Install all the Augmentations from NiteSec",fulfilled:e=>i(e,n.a.NiteSec)},{title:"Join the faction hinted at in j3.msg",fulfilled:e=>e.factions.includes("The Black Hand")},{title:"Install all the Augmentations from The Black Hand",fulfilled:e=>i(e,n.a["The Black Hand"])},{title:"Join the faction hinted at in 19dfj3l1nd.msg",fulfilled:e=>e.factions.includes("BitRunners")},{title:"Install all the Augmentations from BitRunners",fulfilled:e=>i(e,n.a.BitRunners)},{title:"Complete fl1ght.exe",fulfilled:e=>e.factions.includes("Daedalus")},{title:"Install the special Augmentation from Daedalus",fulfilled:e=>e.augmentations.some(e=>"The Red Pill"==e.name)},{title:"Install the final backdoor and free yourself.",fulfilled:()=>!1}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a(2),i=a(163),o=a(279),s=a(99),l=a(9),c=a(208),u=a(12),m=a(211),h=a(11);function p(e){const t=e.workerScript.scriptRef,a=c.a.bind(null,t),p=s.a.bind(null,t,t.server);const d=t.onlineMoneyMade/t.onlineRunningTime,f=t.onlineExpGained/t.onlineRunningTime,g=t.offlineMoneyMade/t.offlineRunningTime,y=t.offlineExpGained/t.offlineRunningTime;return n.createElement(i.a,{headerClass:"active-scripts-script-header",headerContent:n.createElement(n.Fragment,null,e.workerScript.name),panelClass:"active-scripts-script-panel",panelContent:n.createElement(n.Fragment,null,n.createElement("pre",null,"Threads: ",r.a.formatThreads(e.workerScript.scriptRef.threads)),n.createElement("pre",null,"Args: ",Object(m.a)(e.workerScript.args)),n.createElement("pre",null,"Online Time: ",Object(u.b)(1e3*t.onlineRunningTime)),n.createElement("pre",null,"Offline Time: ",Object(u.b)(1e3*t.offlineRunningTime)),n.createElement("pre",null,"Total online production: ",n.createElement(h.a,{money:t.onlineMoneyMade})),n.createElement("pre",null,Array(26).join(" ")+r.a.formatExp(t.onlineExpGained)+" hacking exp"),n.createElement("pre",null,"Online production rate: ",n.createElement(h.a,{money:d})," / second"),n.createElement("pre",null,Array(25).join(" ")+r.a.formatExp(f)+" hacking exp / second"),n.createElement("pre",null,"Total offline production: ",n.createElement(h.a,{money:t.offlineMoneyMade})),n.createElement("pre",null,Array(27).join(" ")+r.a.formatExp(t.offlineExpGained)+" hacking exp"),n.createElement("pre",null,"Offline production rate: ",n.createElement(h.a,{money:g})," / second"),n.createElement("pre",null,Array(26).join(" ")+r.a.formatExp(y)+" hacking exp / second"),n.createElement(o.a,{onClick:a,text:"Log"}),n.createElement(o.a,{onClick:function(){p(),Object(l.a)("Killing script")},text:"Kill Script"}))})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(205),r=a(182);function i(){Object(r.a)("loader"),Object(n.a)("entire-game-container").style.visibility="visible"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(14);const r=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];class i{constructor(){var e,t,a;a=0,(t="state")in(e=this)?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a}getState(){return r[this.state]}nextState(){(this.state<0||this.state>=r.length)&&(this.state=0),++this.state,this.state>=r.length&&(this.state=0)}toJSON(){return Object(n.b)("CorporationState",this)}static fromJSON(e){return Object(n.a)(i,e.data)}}n.c.constructors.CorporationState=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){function t(t){"Escape"===t.key&&e.removePopup()}return Object(n.useEffect)(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)})),r.a.createElement("div",{className:"popup-box-content",id:e.id+"-content"},r.a.createElement(e.content,e.props))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(111),r=a(44);const i={};!function(){let e,t,a;e="The Beginner's Guide to Hacking",t=r.a.HackersStartingHandbook,a="Some resources:

Learn to Program

For Experienced JavaScript Developers: NetscriptJS

Netscript Documentation

When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()

-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game

-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",i[t]=new n.a(e,t,a),e="The Complete Handbook for Creating a Successful Corporation",t=r.a.CorporationManagementHandbook,a="Getting Started with Corporations
To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.

Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.

The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.

Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.

Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.

Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.

These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.

Tips/Pointers
-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.

-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.

-If your employees have low morale, energy, or happiness, their production will greatly suffer.

-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

-Don't forget to advertise your company. You won't have any business if nobody knows you.

-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales

-Remember, you need to spend money to make money!

-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",i[t]=new n.a(e,t,a),e="A Brief History of Synthoids",t=r.a.HistoryOfSynthoids,a="Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, are composed entirely of organic substances. For this reason, Synthoids are virtually identical to humans in form, composition, and appearance.

Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued OmniTek had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.

All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.

It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.

In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. In response, many nations have created Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.

To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

Nobody knows what happened to the terrorist group Ascendis Totalis.",i[t]=new n.a(e,t,a),e="A Green Tomorrow",t=r.a.AGreenTomorrow,a="Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.

The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",i[t]=new n.a(e,t,a),e="Alpha and Omega",t=r.a.AlphaOmega,a="Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.'

And once we were seated on the throne we said 'Behold, I am making all things new.' Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, 'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring of the water of life without payment. The one who conquers will have this heritage, and we will be his God and he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, for it is the second true death.'",i[t]=new n.a(e,t,a),e="Are We Living in a Computer Simulation?",t=r.a.SimulatedReality,a="The idea that we are living in a virtual world is not new. It's a trope that has been explored constantly in literature and pop culture. However, it is also a legitimate scientific hypothesis that many notable physicists and philosophers have debated for years.

Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if continued technological advancement is a reasonable outcome, then it is very likely that such a scenario has already happened.

Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",i[t]=new n.a(e,t,a),e="Beyond Man",t=r.a.BeyondMan,a="Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?

Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",i[t]=new n.a(e,t,a),e="Brighter than the Sun",t=r.a.BrighterThanTheSun,a="When people think about the corporations that dominate the East, they typically think of KuaiGong International, which holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word for 'sun'. In Chinese culture, the sun is a 'yang' symbol associated with life, heat, masculinity, and heaven.

The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.",i[t]=new n.a(e,t,a),e="Democracy is Dead: The Fall of an Empire",t=r.a.DemocracyIsDead,a="They rose from the shadows in the street.
From the places where the oppressed meet.
Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
Loudness in the silence, Darkness in the light.
They came forth with power and might.
Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
From the ashes rose a new order, corporatocracy was its name.
Rome, Mongol, Byzantine, all of history is just the same.
For man will never change in a fundamental way.
And now democracy is dead, in the USA.",i[t]=new n.a(e,t,a),e="Figures Show Rising Crime Rates in Sector-12",t=r.a.Sector12Crime,a="A recent study by analytics company Wilson Inc. shows a significant rise in criminal activity in Sector-12. Perhaps the most alarming part of the statistic is that most of the rise is in violent crime such as homicide and assault. According to the study, the city saw a total of 21,406 reported homicides in 2076, which is over a 20% increase compared to 2075.

CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.",i[t]=new n.a(e,t,a),e="Man and the Machine",t=r.a.ManAndMachine,a="In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate of technological advancement would continue to accelerate faster and faster until one day machines would be become infinitely more intelligent than humans. This point, called the Singularity, would result in a drastic transformation of the world as we know it. He predicted that the Singularity would arrive by 2045. And yet here we are, more than three decades later, where most would agree that we have not yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",i[t]=new n.a(e,t,a),e="Secret Societies",t=r.a.SecretSocieties,a="The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and distrust. People have long wondered about who these secret society members are and what they do, with the most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world may never know for sure, it is likely that many secret societies do actually exist, even today.

However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.

Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious Bitrunners, whose purpose still remains unknown.",i[t]=new n.a(e,t,a),e="Space: The Failed Frontier",t=r.a.TheFailedFrontier,a="Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, we pushed the boundaries of our scientific limits, and then pushed further. Space exploration lead to the development of many important technologies and new industries.

But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.

And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",i[t]=new n.a(e,t,a),e="Coded Intelligence: Myth or Reality?",t=r.a.CodedIntelligence,a="Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create human intelligence.

We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'",i[t]=new n.a(e,t,a),e="Synthetic Muscles",t=r.a.SyntheticMuscles,a="Initial versions of synthetic muscles weren't made of anything organic but were actually crude devices made to mimic human muscle function. Some of the early iterations were actually made of common materials such as fishing lines and sewing threads due to their high strength for a cheap cost.

As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",i[t]=new n.a(e,t,a),e="Tensions rise in global tech race",t=r.a.TensionsInTechRace,a="Have we entered a new Cold War? Is WWIII just beyond the horizon?

After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, MegaCorp and ECorp have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.",i[t]=new n.a(e,t,a),e="The Cost of Immortality",t=r.a.CostOfImmortality,a="Evolution and advances in medical and augmentation technology has lead to drastic improvements in human mortality rates. Recent figures show that the life expectancy for humans that live in a first-world country is about 130 years of age, almost double of what it was at the turn of the century. However, this increase in average lifespan has had some significant effects on society and culture.

Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.

Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",i[t]=new n.a(e,t,a),e="The Hidden World",t=r.a.TheHiddenWorld,a="WAKE UP SHEEPLE

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

Yes, the Illuminati of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.

OPEN YOUR EYES

It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.

THEY ARE ALL AROUND YOU

After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.",i[t]=new n.a(e,t,a),e="The New God",t=r.a.TheNewGod,a="Everyone has a moment in their life when they wonder about the bigger questions.

What's the point of all this? What is my purpose?

Some people dare to think even bigger.

What will the fate of the human race be?

We live in an era vastly different from that of 15 or even 20 years ago. We have gone beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

The Singularity is here. The merging of man and machine. This is where humanity evolves into ",i[t]=new n.a(e,t,a),e="The New Triads",t=r.a.NewTriads,a="The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian territories. They were often considered one of the first and biggest criminal secret societies. While most of the branches of the Triads have been destroyed over the past few decades, the crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. The most notable of these is the Tetrads.

It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.

Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.",i[t]=new n.a(e,t,a),e="The Secret War",t=r.a.TheSecretWar,a="",i[t]=new n.a(e,t,a)}()},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(615),r=a(616),i=a(710),o=a(711),s=a(712),l=a(716),c=a(273),u=a(21),m=a(278),h=a(14),p=a(74);function d(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new p.a(1e3),this.homeComputer="",this.city=u.a.Sector12,this.location="",this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new c.a,this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.isWorking=!1,this.focus=!1,this.workType="",this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.createProgramName="",this.createProgramReqLvl=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.gang=null,this.corporation=null,this.bladeburner=null,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.sleeves=[],this.resleeves=[],this.sleevesFromCovenant=0,this.bitNodeN=1,this.firstFacInvRecvd=!1,this.firstAugPurchased=!1,this.firstTimeTraveled=!1,this.firstProgramAvailable=!1,this.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new m.a,this.moneySourceB=new m.a,this.scriptProdSinceLastAug=0,this.exploits=[]}Object.assign(d.prototype,s,l,r,i,o,n),d.prototype.toJSON=function(){return Object(h.b)("PlayerObject",this)},d.fromJSON=function(e){return Object(h.a)(d,e.data)},h.c.constructors.PlayerObject=d},function(e,t,a){"use strict";a.r(t),a.d(t,"hasAugmentation",(function(){return r}));var n=a(26);function r(e){const t=e instanceof n.a?e.name:e;for(const e of this.augmentations)if(e.name===t)return!0;for(const e of this.queuedAugmentations)if(e.name===t)return!0;return!1}},function(e,t,a){"use strict";a.r(t),a.d(t,"canAccessBladeburner",(function(){return i})),a.d(t,"inBladeburner",(function(){return o})),a.d(t,"startBladeburner",(function(){return s}));var n=a(147),r=a(50);function i(){return 8!==this.bitNodeN&&(6===this.bitNodeN||7===this.bitNodeN||r.a[6]>0||r.a[7]>0)}function o(){return null!=this.bladeburner&&this.bladeburner instanceof n.a}function s(){this.bladeburner=new n.a(this)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(23),r=a(7);const i={},o={},s={},l={},c={},u={},m={},h={},p={},d={},f={},g={},y={},b={},E={},v={},k={},_={},C={};n.j.forEach(e=>{i[e]=!0,c[e]=!0}),n.d.forEach(e=>{o[e]=!0,c[e]=!0}),n.f.forEach(e=>{s[e]=!0,c[e]=!0}),c[n.i[0]]=!0,l[n.i[0]]=!0,n.b.forEach(e=>{u[e]=!0}),n.h.forEach(e=>{h[e]=!0}),n.a.forEach(e=>{m[e]=!0}),n.k.forEach(e=>{p[e]=!0}),n.c.forEach(e=>{d[e]=!0});for(let e=0;e=e}}const d=[{key:"NukeProgram",name:"NUKE.exe",create:{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:p(1),time:n.a.MillisecondsPerFiveMinutes},run:(e,t,a)=>{if(a instanceof r.a){if(!a.hasAdminRights)return a.openPortCount>=t.getCurrentServer().numOpenPortsRequired?(a.hasAdminRights=!0,void e.print("NUKE successful! Gained root access to "+t.getCurrentServer().hostname)):void e.print("NUKE unsuccessful. Not enough ports have been opened");e.print("You already have root access to this computer. There is no reason to run NUKE.exe")}else e.error("Cannot nuke this kind of server.")}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:p(50),time:2*n.a.MillisecondsPerFiveMinutes},run:(e,t,a)=>{a instanceof r.a?a.sshPortOpen?e.print("SSH Port (22) is already open!"):(a.sshPortOpen=!0,e.print("Opened SSH Port(22)!"),a.openPortCount++):e.error("Cannot run BruteSSH.exe on this kind of server.")}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:p(100),time:n.a.MillisecondsPerHalfHour},run:(e,t,a)=>{a instanceof r.a?a.ftpPortOpen?e.print("FTP Port (21) is already open!"):(a.ftpPortOpen=!0,e.print("Opened FTP Port (21)!"),a.openPortCount++):e.error("Cannot run FTPCrack.exe on this kind of server.")}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:p(250),time:n.a.MillisecondsPer2Hours},run:(e,t,a)=>{a instanceof r.a?a.smtpPortOpen?e.print("SMTP Port (25) is already open!"):(a.smtpPortOpen=!0,e.print("Opened SMTP Port (25)!"),a.openPortCount++):e.error("Cannot run relaySMTP.exe on this kind of server.")}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:p(500),time:n.a.MillisecondsPer4Hours},run:(e,t,a)=>{a instanceof r.a?a.httpPortOpen?e.print("HTTP Port (80) is already open!"):(a.httpPortOpen=!0,e.print("Opened HTTP Port (80)!"),a.openPortCount++):e.error("Cannot run HTTPWorm.exe on this kind of server.")}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:p(750),time:n.a.MillisecondsPer8Hours},run:(e,t,a)=>{a instanceof r.a?a.sqlPortOpen?e.print("SQL Port (1433) is already open!"):(a.sqlPortOpen=!0,e.print("Opened SQL Port (1433)!"),a.openPortCount++):e.error("Cannot run SQLInject.exe on this kind of server.")}},{key:"DeepscanV1",name:"DeepscanV1.exe",create:{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:p(75),time:n.a.MillisecondsPerQuarterHour},run:e=>{e.print("This executable cannot be run."),e.print("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}},{key:"DeepscanV2",name:"DeepscanV2.exe",create:{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:p(400),time:n.a.MillisecondsPer2Hours},run:e=>{e.print("This executable cannot be run."),e.print("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:p(75),time:n.a.MillisecondsPerHalfHour},run:(e,t,a,n)=>{if(1!==n.length)return void e.print("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const r=Object(s.b)(n[0]);null!=r?r instanceof i.a?e.print("ServerProfiler.exe cannot be run on a Hacknet Server."):(e.print(r.hostname+":"),e.print("Server base security level: "+r.baseDifficulty),e.print("Server current security level: "+r.hackDifficulty),e.print("Server growth rate: "+r.serverGrowth),e.print("Netscript hack() execution time: "+Object(o.b)(1e3*Object(h.d)(r,t),!0)),e.print("Netscript grow() execution time: "+Object(o.b)(1e3*Object(h.a)(r,t),!0)),e.print("Netscript weaken() execution time: "+Object(o.b)(1e3*Object(h.f)(r,t),!0))):e.print("Invalid server IP/hostname")}},{key:"AutoLink",name:"AutoLink.exe",create:{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:p(25),time:n.a.MillisecondsPerQuarterHour},run:e=>{e.print("This executable cannot be run."),e.print("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),e.print("When using scan-analyze, click on a server's hostname to connect to it.")}},{key:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(e){return e.sourceFiles.length>0&&e.hacking_skill>=1},time:n.a.MillisecondsPerFiveMinutes/20},run:(e,t)=>{Object(u.a)("bitflume-popup",m.a,{player:t,popupId:"bitflume-popup"})}},{key:"Flight",name:"fl1ght.exe",create:null,run:(e,t)=>{const a=Math.round(30*c.a.DaedalusAugsRequirement);if(!(t.augmentations.length>=a&&t.money.gt(1e11)&&t.hacking_skill>=2500))return e.print(`Augmentations: ${t.augmentations.length} / ${a}`),e.print(`Money: ${l.a.formatMoney(t.money.toNumber())} / $100b`),void e.print(`Hacking skill: ${t.hacking_skill} / 2500`);e.print("We will contact you."),e.print("-- Daedalus --")}}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(16);function r(e){let t=e;return t.startsWith("[")&&(t=t.slice(1)),t.endsWith("]")&&(t=t.slice(0,-1)),t}function i(e){let t=e;return(t.startsWith('"')||t.startsWith("'"))&&(t=t.slice(1)),(t.endsWith('"')||t.endsWith("'"))&&(t=t.slice(0,-1)),t}function o(e){const t=[];return e.forEach(e=>{let a=e.toString();a=["[",a,"]"].join(""),t.push(a)}),t.join(",").replace(/\s/g,"")}const s=[{desc:e=>["A prime factor is a factor that is a prime number.",`What is the largest prime factor of ${e}?`].join(" "),difficulty:1,gen:()=>Object(n.a)(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(e,t)=>{let a=2,n=e;for(;n>(a-1)*(a-1);){for(;n%a==0;)n=Math.round(n/a);++a}return(1===n?a-1:n)===parseInt(t,10)}},{desc:e=>["Given the following integer array, find the contiguous subarray","(containing at least one number) which has the largest sum and return that sum.","'Sum' refers to the sum of all the numbers in the subarray.\n",""+e.toString()].join(" "),difficulty:1,gen:()=>{const e=Object(n.a)(5,40),t=[];t.length=e;for(let a=0;a{const a=e.slice();for(let e=1;e["It is possible write four as a sum in exactly four different ways:\n\n","    3 + 1\n","    2 + 2\n","    2 + 1 + 1\n","    1 + 1 + 1 + 1\n\n",`How many different ways can the number ${e} be written as a sum of at least`,"two positive integers?"].join(" "),difficulty:1.5,gen:()=>Object(n.a)(8,100),name:"Total Ways to Sum",numTries:10,solver:(e,t)=>{const a=[1];a.length=e+1,a.fill(0,1);for(let t=1;t{let t=["Given the following array of array of numbers representing a 2D matrix,","return the elements of the matrix as an array in spiral order:\n\n"].join(" ");return t+="    [\n",t+=e.map(e=>"        ["+e.map(e=>(""+e).padStart(2," ")).join(",")+"]").join("\n"),t+="\n    ]\n",t+=["\nHere is an example of what spiral order should be:\n\n","    [\n","        [1, 2, 3]\n","        [4, 5, 6]\n","        [7, 8, 9]\n","    ]\n\n","Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n","Note that the matrix will not always be square:\n\n","    [\n","        [1,  2,  3,  4]\n","        [5,  6,  7,  8]\n","        [9, 10, 11, 12]\n","    ]\n\n","Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]"].join(" "),t},difficulty:2,gen:()=>{const e=Object(n.a)(1,15),t=Object(n.a)(1,15),a=[];a.length=e;for(let n=0;n{const a=[];let n=0,i=e.length-1,o=0,s=e[0].length-1,l=0;for(;;){for(let t=o;t<=s;t++)a[l]=e[n][t],++l;if(++n>i)break;for(let t=n;t<=i;t++)a[l]=e[t][s],++l;if(--s=o;t--)a[l]=e[i][t],++l;if(--i=n;t--)a[l]=e[t][o],++l;if(++o>s)break}const c=r(t).replace(/\s/g,"").split(",");for(let e=0;e["You are given the following array of integers:\n\n",e+"\n\n","Each element in the array represents your MAXIMUM jump length","at that position. This means that if you are at position i and your","maximum jump length is n, you can jump to any position from","i to i+n.","\n\nAssuming you are initially positioned","at the start of the array, determine whether you are","able to reach the last index exactly.\n\n","Your answer should be submitted as 1 or 0, representing true and false respectively"].join(" "),difficulty:2.5,gen:()=>{const e=Object(n.a)(3,25),t=[];t.length=e;for(let e=0;e{const a=e.length;let n=0;for(let t=0;n["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${o(e)}]\n\n`,"Example:\n\n","[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n","would merge into [[1, 6], [8, 16]].\n\n","The intervals must be returned in ASCENDING order.","You can assume that in an interval, the first number will always be","smaller than the second."].join(" "),difficulty:3,gen:()=>{const e=[],t=Object(n.a)(3,20);for(let a=0;a{const a=e.slice();a.sort((e,t)=>e[0]-t[0]);const n=[];let i=a[0][0],s=a[0][1];for(const e of a)e[0]<=s?s=Math.max(s,e[1]):(n.push([i,s]),i=e[0],s=e[1]);n.push([i,s]);const l=o(n),c=t.replace(/\s/g,"");return l===c||l===r(c)}},{desc:e=>["Given the following string containing only digits, return","an array with all possible valid IP address combinations","that can be created from the string:\n\n",e+"\n\n","Note that an octet cannot begin with a '0' unless the number","itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n","Examples:\n\n","25525511135 -> [255.255.11.135, 255.255.111.35]\n","1938718066 -> [193.87.180.66]"].join(" "),difficulty:3,gen:()=>{let e="";for(let t=0;t<4;++t){e+=Object(n.a)(0,255).toString()}return e},name:"Generate IP Addresses",numTries:10,solver:(e,t)=>{const a=[];for(let t=1;t<=3;++t)for(let n=1;n<=3;++n)for(let r=1;r<=3;++r)for(let i=1;i<=3;++i)if(t+n+r+i===e.length){const o=parseInt(e.substring(0,t),10),s=parseInt(e.substring(t,t+n),10),l=parseInt(e.substring(t+n,t+n+r),10),c=parseInt(e.substring(t+n+r,t+n+r+i),10);if(o<=255&&s<=255&&l<=255&&c<=255){const t=[o.toString(),".",s.toString(),".",l.toString(),".",c.toString()].join("");t.length===e.length+3&&a.push(t)}}const n=r(t).replace(/\s/g,"").split(",");if(n.length!==a.length)return!1;for(const e of n)if(!a.includes(e))return!1;return!0}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",e+"\n\n","Determine the maximum possible profit you can earn using at most","one transaction (i.e. you can only buy and sell the stock once). If no profit can be made","then the answer should be 0. Note","that you have to buy the stock before you can sell it"].join(" "),difficulty:1,gen:()=>{const e=Object(n.a)(3,50),t=[];t.length=e;for(let a=0;a{let a=0,n=0;for(let t=1;t["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",e+"\n\n","Determine the maximum possible profit you can earn using as many","transactions as you'd like. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:2,gen:()=>{const e=Object(n.a)(3,50),t=[];t.length=e;for(let a=0;a{let a=0;for(let t=1;t["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",e+"\n\n","Determine the maximum possible profit you can earn using at most","two transactions. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:5,gen:()=>{const e=Object(n.a)(3,50),t=[];t.length=e;for(let a=0;a{let a=Number.MIN_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER,r=0,i=0;for(const t of e)i=Math.max(i,n+t),n=Math.max(n,r-t),r=Math.max(r,a+t),a=Math.max(a,-1*t);return i.toString()===t}},{desc:e=>["You are given the following array with two elements:\n\n",`[${e[0]}, [${e[1]}]]\n\n`,"The first element is an integer k. The second element is an","array of stock prices (which are numbers) where the i-th element","represents the stock price on day i.\n\n","Determine the maximum possible profit you can earn using at most","k transactions. A transaction is defined as buying and then selling","one share of the stock. Note that you cannot engage in multiple","transactions at once. In other words, you must sell the stock before","you can buy it again.\n\n","If no profit can be made, then the answer should be 0."].join(" "),difficulty:8,gen:()=>{const e=Object(n.a)(2,10),t=Object(n.a)(3,50),a=[];a.length=t;for(let e=0;e{const a=e[0],n=e[1],r=n.length;if(r<2)return 0===parseInt(t);if(a>r/2){let e=0;for(let t=1;t0;--e)o[e]=Math.max(o[e],i[e]+s),i[e]=Math.max(i[e],o[e-1]-s)}return parseInt(t)===o[a]}},{desc:e=>{function t(e,a=0){const n=e.length;if(a>=n)return"";let r=[" ".repeat(n-a+1),"[",e[a].toString(),"]"].join("");return a 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const e=[],t=Object(n.a)(3,12);e.length=t;for(let a=0;a{const a=e.length,n=e[a-1].slice();for(let t=a-2;t>-1;--t)for(let a=0;a{const t=e[0],a=e[1];return["You are in a grid with",`${t} rows and ${a} columns, and you are`,"positioned in the top-left corner of that grid. You are trying to","reach the bottom-right corner of the grid, but you can only","move down or right on each step. Determine how many","unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an array","with the number of rows and columns:\n\n",`[${t}, ${a}]`].join(" ")},difficulty:3,gen:()=>[Object(n.a)(2,14),Object(n.a)(2,14)],name:"Unique Paths in a Grid I",numTries:10,solver:(e,t)=>{const a=e[0],n=e[1],r=[];r.length=a;for(let e=0;e{let t="";for(const a of e)t+=a.toString()+",\n";return["You are located in the top-left corner of the following grid:\n\n",t+"\n","You are trying reach the bottom-right corner of the grid, but you can only","move down or right on each step. Furthermore, there are obstacles on the grid","that you cannot move onto. These obstacles are denoted by '1', while empty","spaces are denoted by 0.\n\n","Determine how many unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an 2D array of numbers representing the grid."].join(" ")},difficulty:5,gen:()=>{const e=Object(n.a)(2,12),t=Object(n.a)(2,12),a=[];a.length=e;for(let n=0;n{const a=[];a.length=e.length;for(let t=0;t0?a[e-1][t]:0)+(t>0?a[e][t-1]:0);return a[a.length-1][a[0].length-1]===parseInt(t)}},{desc:e=>["Given the following string:\n\n",e+"\n\n","remove the minimum number of invalid parentheses in order to validate","the string. If there are multiple minimal ways to validate the string,","provide all of the possible results. The answer should be provided","as an array of strings. If it is impossible to validate the string","the result should be an array with only an empty string.\n\n","IMPORTANT: The string may contain letters, not just parentheses.","Examples:\n",'"()())()" -> [()()(), (())()]\n','"(a)())()" -> [(a)()(), (a())()]\n','")( -> [""]'].join(" "),difficulty:10,gen:()=>{const e=Object(n.a)(6,20),t=[];t.length=e,Math.random()<.8?t[0]="(":t[0]=")";for(let a=1;a{let a=0,n=0;const i=[];for(let t=0;t0?--a:++n);!function e(t,a,n,r,i,o,s){if(i.length!==a)"("===i[a]?(n>0&&e(t,a+1,n-1,r,i,o,s),e(t+1,a+1,n,r,i,o+i[a],s)):")"===i[a]?(r>0&&e(t,a+1,n,r-1,i,o,s),t>0&&e(t-1,a+1,n,r,i,o+i[a],s)):e(t,a+1,n,r,i,o+i[a],s);else if(0===n&&0===r&&0===t){for(let e=0;e{const t=e[0],a=e[1];return["You are given the following string which contains only digits between 0 and 9:\n\n",t+"\n\n",`You are also given a target number of ${a}. Return all possible ways`,"you can add the +, -, and * operators to the string such that it evaluates","to the target number.\n\n","The provided answer should be an array of strings containing the valid expressions.","The data provided by this problem is an array with two elements. The first element","is the string of digits, while the second element is the target number:\n\n",`["${t}", ${a}]\n\n`,"NOTE: Numbers in the expression cannot have leading 0's. In other words,",'"1+01" is not a valid expression',"Examples:\n\n",'Input: digits = "123", target = 6\n',"Output: [1+2+3, 1*2*3]\n\n",'Input: digits = "105", target = 5\n',"Output: [1*0+5, 10-5]"].join(" ")},difficulty:10,gen:()=>{const e=Object(n.a)(4,12),t=[];t.length=e;for(let e=0;e{const a=e[0],n=e[1];const o=r(t).split(",");for(let e=0;e"}}));return r.a.createElement("div",null,r.a.createElement(s.b,{value:e.c.type,tag:s.a.Tag_h1}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",null,"You are attempting to solve a Coding Contract. You have ",e.c.getMaxNumTries()-e.c.tries," tries remaining, after which the contract will self-destruct."),r.a.createElement("br",null),r.a.createElement("p",null,c),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input",style:{width:"50%",marginTop:"8px"},autoFocus:!0,placeholder:"Enter Solution here",value:t,onChange:function(e){a(e.target.value)},onKeyDown:function(a){const n=a.target.value;a.keyCode===i.a.ENTER&&""!==n&&(a.preventDefault(),e.onAttempt(t))}}),r.a.createElement("button",{className:"std-button",onClick:()=>e.onAttempt(t)},"Solve"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function r(e){let t="";for(let a=0;a({rerenderFlag:!e.rerenderFlag}))}routeToMain(){this.setState({purchasingAugs:!1})}routeToPurchaseAugs(){this.setState({purchasingAugs:!0})}sleevePurchases(){Object(u.d)(this.props.p)}startFieldWork(){this.props.p.startFactionFieldWork(this.props.faction)}startHackingContracts(){this.props.p.startFactionHackWork(this.props.faction)}startHackingMission(){const e=this.props.faction;this.props.p.singularityStopWork(),this.props.engine.loadMissionContent(),this.props.startHackingMissionFn(e)}startSecurityWork(){this.props.p.startFactionSecurityWork(this.props.faction)}render(){return this.state.purchasingAugs?this.renderAugmentationsPage():this.renderMainPage()}renderMainPage(){const e=this.props.p,t=this.props.faction,a=t.getInfo(),r=e.inGang()&&e.getGangName()===t.name,u=Math.floor(l.a.BaseFavorToDonate*c.a.RepToDonateToFaction),h=t.favor>=u,p="The Covenant"===t.name&&e.bitNodeN>=10&&m.a[10];let f=e.canAccessGang()&&d.includes(t.name);return e.inGang()&&(e.getGangName()!==t.name?f=!1:e.getGangName()===t.name&&(f=!0)),n.createElement("div",{className:"faction-container"},n.createElement("h1",null,t.name),n.createElement(o.a,{faction:t,factionInfo:a}),f&&n.createElement(s.a,{buttonText:"Manage Gang",infoText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",onClick:this.manageGang}),!r&&a.offerHackingMission&&n.createElement(s.a,{buttonText:"Hacking Mission",infoText:"Attempt a hacking mission for your faction. A mission is a mini game that, if won, earns you significant reputation with this faction. (Recommended hacking level: 200+)",onClick:this.startHackingMission}),!r&&a.offerHackingWork&&n.createElement(s.a,{buttonText:"Hacking Contracts",infoText:"Complete hacking contracts for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your hacking skill. You will gain hacking exp.",onClick:this.startHackingContracts}),!r&&a.offerFieldWork&&n.createElement(s.a,{buttonText:"Field Work",infoText:"Carry out field missions for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on all of your stats. You will gain exp for all stats.",onClick:this.startFieldWork}),!r&&a.offerSecurityWork&&n.createElement(s.a,{buttonText:"Security Work",infoText:"Serve in a security detail for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your combat stats. You will gain exp for all combat stats.",onClick:this.startSecurityWork}),!r&&a.offersWork()&&n.createElement(i.a,{faction:this.props.faction,p:this.props.p,rerender:this.rerender,favorToDonate:u,disabled:!h}),n.createElement(s.a,{buttonText:"Purchase Augmentations",infoText:"As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.",onClick:this.routeToPurchaseAugs}),p&&n.createElement(s.a,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:"Purchase Duplicate Sleeves and upgrades. These are permanent!",onClick:this.sleevePurchases}))}renderAugmentationsPage(){return n.createElement(n.Fragment,null,n.createElement(r.a,{faction:this.props.faction,p:this.props.p,routeToMainPage:this.routeToMain}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(629),i=a(18),o=a(4),s=a(136),l=a(33),c=a(22);const u={width:"70%"};class m extends n.Component{constructor(e){super(e),this.isPlayersGang=e.p.inGang()&&e.p.getGangName()===e.faction.name,this.state={rerenderFlag:!1,sortOrder:s.b.Default},this.rerender=this.rerender.bind(this)}getAugs(){if(this.isPlayersGang){const e=[];for(const t in i.a){i.a[t].isSpecial||e.push(t)}return e}return this.props.faction.augmentations.slice()}getAugsSorted(){switch(l.a.PurchaseAugmentationsOrder){case s.b.Cost:return this.getAugsSortedByCost();case s.b.Reputation:return this.getAugsSortedByReputation();default:return this.getAugsSortedByDefault()}}getAugsSortedByCost(){const e=this.getAugs();return e.sort((e,t)=>{const a=i.a[e],n=i.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseCost-n.baseCost}),e}getAugsSortedByReputation(){const e=this.getAugs();return e.sort((e,t)=>{const a=i.a[e],n=i.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseRepRequirement-n.baseRepRequirement}),e}getAugsSortedByDefault(){return this.getAugs()}switchSortOrder(e){l.a.PurchaseAugmentationsOrder=e,this.rerender()}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=this.getAugsSorted(),t=e.filter(e=>e===o.a.NeuroFluxGovernor||!this.props.p.augmentations.some(t=>t.name===e)&&!this.props.p.queuedAugmentations.some(t=>t.name===e)),a=e=>n.createElement(r.a,{augName:e,faction:this.props.faction,key:e,p:this.props.p,rerender:this.rerender}),i=t.map(e=>a(e));let l=n.createElement(n.Fragment,null);const m=e.filter(e=>!t.includes(e));return 0!==m.length&&(l=n.createElement(n.Fragment,null,n.createElement("br",null),n.createElement("h2",null,"Purchased Augmentations"),n.createElement("p",{style:u},"This factions also offers these augmentations but you already own them."),m.map(e=>a(e)))),n.createElement("div",null,n.createElement(c.a,{onClick:this.props.routeToMainPage,text:"Back"}),n.createElement("h1",null,"Faction Augmentations"),n.createElement("p",{style:u},"These are all of the Augmentations that are available to purchase from ",this.props.faction.name,". Augmentations are powerful upgrades that will enhance your abilities."),n.createElement(c.a,{onClick:()=>this.switchSortOrder(s.b.Cost),text:"Sort by Cost"}),n.createElement(c.a,{onClick:()=>this.switchSortOrder(s.b.Reputation),text:"Sort by Reputation"}),n.createElement(c.a,{onClick:()=>this.switchSortOrder(s.b.Default),text:"Sort by Default Order"}),n.createElement("br",null),i,l,n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(84),i=a(630),o=a(18),s=a(4),l=a(33),c=a(11),u=a(75),m=a(17),h=a(22),p=a(631);class d extends n.Component{constructor(e){super(e);const t=o.a[this.props.augName];if(null==t)throw new Error(`aug ${this.props.augName} does not exists`);this.aug=t,this.handleClick=this.handleClick.bind(this)}getMoneyCost(){return this.aug.baseCost*this.props.faction.getInfo().augmentationPriceMult}getRepCost(){return this.aug.baseRepRequirement*this.props.faction.getInfo().augmentationRepRequirementMult}handleClick(){if(l.a.SuppressBuyAugmentationConfirmation)Object(r.g)(this.aug,this.props.faction);else{const e="purchase-augmentation-popup";Object(m.a)(e,i.a,{aug:this.aug,faction:this.props.faction,player:this.props.p,popupId:e})}}hasPrereqs(){return Object(r.c)(this.aug)}hasReputation(){return this.props.faction.playerReputation>=this.getRepCost()}owned(){let e=!1;for(const t of this.props.p.queuedAugmentations)if(t.name===this.props.augName){e=!0;break}for(const t of this.props.p.augmentations)if(t.name===this.props.augName){e=!0;break}return e}render(){if(null==this.aug)return console.error("Invalid Augmentation when trying to create PurchaseableAugmentation display element: "+this.props.augName),null;const e=this.getMoneyCost(),t=this.getRepCost();let a=!1,i=n.createElement(n.Fragment,null),o="";this.hasPrereqs()?this.aug.name!==s.a.NeuroFluxGovernor&&(this.aug.owned||this.owned())?a=!0:this.hasReputation()?i=n.createElement(n.Fragment,null,"UNLOCKED (at ",Object(u.a)(t)," faction reputation) - ",n.createElement(c.a,{money:e,player:this.props.p})):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",Object(u.a)(t)," faction reputation - ",n.createElement(c.a,{money:e,player:this.props.p}),")"),o="red"):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",this.aug.prereqs.map(e=>Object(p.a)(e))," as prerequisite)"),o="red");const l={display:"inline-block"};""!==o&&(l.color=o);let m=this.aug.name;this.aug.name===s.a.NeuroFluxGovernor&&(m+=" - Level "+Object(r.b)());let d=n.createElement(n.Fragment,null);return d="string"==typeof this.aug.info?n.createElement(n.Fragment,null,n.createElement("span",{dangerouslySetInnerHTML:{__html:this.aug.info}}),n.createElement("br",null),n.createElement("br",null),this.aug.stats):n.createElement(n.Fragment,null,this.aug.info,n.createElement("br",null),n.createElement("br",null),this.aug.stats),n.createElement("li",{key:this.aug.name},n.createElement("span",{style:{margin:"4px",padding:"4px"}},n.createElement(h.a,{disabled:a,onClick:this.handleClick,style:{display:"inline-block"},text:m,tooltip:d}),n.createElement("p",{style:l},i)))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(84),o=a(123),s=a(11),l=a(17);function c(e){const t=e.faction.getInfo();return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null,e.aug.name),r.a.createElement("br",null),e.aug.info,r.a.createElement("br",null),r.a.createElement("br",null),e.aug.stats,r.a.createElement("br",null),r.a.createElement("br",null),"Would you like to purchase the ",e.aug.name," Augmentation for ",r.a.createElement(s.a,{money:e.aug.baseCost*t.augmentationPriceMult}),"?",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("button",{autoFocus:!0,className:"std-button",onClick:function(){!Object(o.e)(e.aug)&&e.player.hasAugmentation(e.aug)||(Object(i.g)(e.aug,e.faction),Object(l.b)(e.popupId))}},"Purchase"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);function r(e){return n.createElement("span",{className:"samefont",style:{color:"white"}},e)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(5),o=a(498),s=a(11),l=a(75),c=a(22),u=a(2),m=a(9),h=a(194);const p={margin:"5px",height:"26px"};function d(e){const[t,a]=Object(n.useState)(null),d=(i.a.DonateMoneyToRepDivisor+"").length-1;function f(){return null!==t&&(!(isNaN(t)||t<=0)&&!e.p.money.lt(t))}return r.a.createElement("div",{className:"faction-work-div"},r.a.createElement("div",{className:"faction-work-div-wrapper"},r.a.createElement("input",{className:"text-input",onChange:function(e){const t=u.a.parseMoney(e.target.value);""===e.target.value||isNaN(t)?a(null):a(t)},placeholder:"Donation amount",style:p,disabled:e.disabled}),r.a.createElement(c.a,{onClick:function(){const a=e.faction,n=t;if(null===n)return;if(!f())return;e.p.loseMoney(n);const i=Object(o.a)(n,e.p);e.faction.playerReputation+=i,Object(m.a)(r.a.createElement(r.a.Fragment,null,"You just donated ",r.a.createElement(s.a,{money:n})," to ",a.name," to gain ",Object(l.a)(i)," reputation.")),e.rerender()},text:"Donate Money",disabled:e.disabled||!f()}),r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):f()?r.a.createElement("p",null,"This donation will result in ",Object(l.a)(Object(o.a)(t,e.p))," reputation gain"):e.p.money.lt(t)?r.a.createElement("p",null,"Insufficient funds"):r.a.createElement("p",null,"Invalid donate amount entered!")}),null),e.disabled?r.a.createElement("p",null,"Unlocked at ",e.favorToDonate," favor with ",e.faction.name):r.a.createElement("div",{className:"text"},r.a.createElement(h.a,{tex:String.raw`reputation = \frac{\text{donation amount} \times \text{reputation multiplier}}{10^{${d}}}`}))))}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(638),i=a(639),o=a(75),s=a(337),l=a(194);const c={display:"block"},u={display:"block",width:"70%"};class m extends n.Component{constructor(e){super(e),this.getFavorGainContent=this.getFavorGainContent.bind(this),this.getReputationContent=this.getReputationContent.bind(this)}getFavorGainContent(){const e=this.props.faction.getFavorGain()[0];return n.createElement(n.Fragment,null,"You will have ",Object(s.a)(this.props.faction.favor+e)," faction favor after installing an Augmentation.",n.createElement(l.a,{tex:String.raw`\large{r = \text{total faction reputation}}`}),n.createElement(l.a,{tex:String.raw`\large{favor=\left\lfloor\log_{1.02}\left(\frac{r+25000}{25500}\right)\right\rfloor}`}))}getReputationContent(){return n.createElement(n.Fragment,null,"Reputation: ",Object(o.a)(this.props.faction.playerReputation))}render(){const e=n.createElement(n.Fragment,null,"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you install an Augmentation. The amount of favor you gain depends on the total amount of reputation you earned with this faction. Across all resets.",n.createElement(l.a,{tex:String.raw`\large{r = reputation}`}),n.createElement(l.a,{tex:String.raw`\large{\Delta r = \Delta r \times \frac{100+favor}{100}}`})),t={__html:this.props.factionInfo.infoText};return n.createElement("div",null,n.createElement("pre",null,n.createElement("i",{className:"text",dangerouslySetInnerHTML:t})),n.createElement("p",{style:c},"-------------------------"),n.createElement(r.a,{intervalTime:5e3,getContent:this.getReputationContent,getTooltip:this.getFavorGainContent}),n.createElement("p",{style:c},"-------------------------"),n.createElement(i.a,{content:n.createElement(n.Fragment,null,"Faction Favor: ",Object(s.a)(this.props.faction.favor)),tooltip:e}),n.createElement("p",{style:c},"-------------------------"),n.createElement("p",{style:u},"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities."))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);class r extends n.Component{constructor(e){var t,a,n;super(e),n=0,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}hasTooltip(){return null==this.props.getTooltip||!!this.props.getTooltip()}tooltip(){return this.props.getTooltip?this.props.getTooltip():n.createElement(n.Fragment,null)}render(){return n.createElement("div",{className:"tooltip",style:this.props.style},n.createElement("p",null,this.props.getContent()),this.hasTooltip()&&n.createElement("span",{className:"tooltiptext"},this.tooltip()))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);class r extends n.Component{render(){return n.createElement("div",{className:"tooltip",style:this.props.style},n.createElement("p",null,this.props.content),n.createElement("span",{className:"tooltiptext"},this.props.tooltip))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(641),o=a(239),s=a(277),l=a(644),c=a(22),u=a(11),m=a(9);function h(){return(h=Object.assign||function(e){for(var t=1;t=s.b&&(f=!0);const g=[];for(let t=0;t=s.b||(e.p.canAfford(p())?(e.p.loseMoney(p()),e.p.sleevesFromCovenant+=1,e.p.sleeves.push(new o.a(e.p)),d()):Object(m.a)("You cannot afford to purchase a Duplicate Sleeve",!1))},text:"Purchase"}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",null,"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes."),g)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(642);class i extends n.Component{render(){return n.createElement("div",{className:"bladeburner-action"},n.createElement("h1",null,"Duplicate Sleeve ",this.props.index),n.createElement(r.a,this.props))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(2),i=a(22),o=a(11);class s extends n.Component{constructor(e){super(e),this.state={amt:1},this.changePurchaseAmount=this.changePurchaseAmount.bind(this),this.purchaseMemory=this.purchaseMemory.bind(this)}changePurchaseAmount(e){let t=parseInt(e.target.value);isNaN(t)&&(t=1);const a=100-this.props.sleeve.memory;t>a&&(t=a),this.setState({amt:t})}getPurchaseCost(){if(isNaN(this.state.amt))return 1/0;const e=100-this.props.sleeve.memory;return this.state.amt>e?1/0:this.props.sleeve.getMemoryUpgradeCost(this.state.amt)}purchaseMemory(){const e=this.getPurchaseCost();this.props.p.canAfford(e)&&(this.props.sleeve.upgradeMemory(this.state.amt),this.props.p.loseMoney(e),this.props.rerender())}render(){const e=`sleeve-${this.props.index}-memory-upgrade-input`,t=100-this.props.sleeve.memory,a=this.getPurchaseCost(),s=!this.props.p.canAfford(a);let l;return l=isNaN(this.state.amt)?n.createElement(n.Fragment,null,"Invalid value"):this.state.amt>t?n.createElement(n.Fragment,null,"Memory cannot exceed 100"):n.createElement(n.Fragment,null,"Purchase ",this.state.amt," memory - ",n.createElement(o.a,{money:a,player:this.props.p}),"?"),n.createElement("div",null,n.createElement("h2",null,n.createElement("u",null,"Upgrade Memory")),n.createElement("p",null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:"," ",r.a.formatSleeveMemory(this.props.sleeve.memory),")"),n.createElement("label",{htmlFor:e},"Amount of memory to purchase (must be an integer):"),n.createElement("input",{className:"text-input",id:e,onChange:this.changePurchaseAmount,type:"number",value:this.state.amt}),n.createElement("br",null),n.createElement(i.a,{disabled:s,onClick:this.purchaseMemory,text:l}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(23);const r=[{name:n.j[0],nextPosition:n.j[1],baseSalary:33,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.05,reqdHacking:1,repMultiplier:.9},{name:n.j[1],nextPosition:n.j[2],baseSalary:80,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.1,reqdHacking:51,reqdReputation:8e3,repMultiplier:1.1},{name:n.j[2],nextPosition:n.j[3],baseSalary:165,charismaEffectiveness:20,charismaExpGain:.08,hackingEffectiveness:80,hackingExpGain:.4,reqdCharisma:51,reqdHacking:251,reqdReputation:4e4,repMultiplier:1.3},{name:n.j[3],nextPosition:n.j[4],baseSalary:500,charismaEffectiveness:25,charismaExpGain:.1,hackingEffectiveness:75,hackingExpGain:.8,reqdCharisma:151,reqdHacking:401,reqdReputation:2e5,repMultiplier:1.5},{name:n.j[4],nextPosition:n.j[5],baseSalary:800,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1,reqdCharisma:251,reqdHacking:501,reqdReputation:4e5,repMultiplier:1.6},{name:n.j[5],nextPosition:n.j[6],baseSalary:1650,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1.1,reqdCharisma:251,reqdHacking:501,reqdReputation:8e5,repMultiplier:1.6},{name:n.j[6],nextPosition:n.j[7],baseSalary:2310,charismaEffectiveness:30,charismaExpGain:.6,hackingEffectiveness:70,hackingExpGain:1.2,reqdCharisma:401,reqdHacking:601,reqdReputation:16e5,repMultiplier:1.75},{name:n.j[7],nextPosition:null,baseSalary:2640,charismaEffectiveness:35,charismaExpGain:1,hackingEffectiveness:65,hackingExpGain:1.5,reqdCharisma:501,reqdHacking:751,reqdReputation:32e5,repMultiplier:2},{name:n.d[0],nextPosition:n.d[1],baseSalary:26,charismaEffectiveness:10,charismaExpGain:.01,hackingEffectiveness:90,hackingExpGain:.04,reqdHacking:1,repMultiplier:.9},{name:n.d[1],nextPosition:n.d[2],baseSalary:66,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.08,reqdHacking:26,reqdReputation:7e3,repMultiplier:1.1},{name:n.d[2],nextPosition:n.d[3],baseSalary:132,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.3,reqdCharisma:51,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.3},{name:n.d[3],nextPosition:n.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.2,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.4},{name:n.i[0],nextPosition:n.j[5],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:n.f[0],nextPosition:n.f[1],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:n.f[1],nextPosition:n.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.3},{name:n.b[0],nextPosition:n.b[1],baseSalary:46,charismaEffectiveness:90,charismaExpGain:.08,hackingEffectiveness:10,hackingExpGain:.01,reqdCharisma:1,reqdHacking:1,repMultiplier:.9},{name:n.b[1],nextPosition:n.b[2],baseSalary:100,charismaEffectiveness:85,charismaExpGain:.15,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:51,reqdHacking:6,reqdReputation:8e3,repMultiplier:1.1},{name:n.b[2],nextPosition:n.b[3],baseSalary:200,charismaEffectiveness:85,charismaExpGain:.3,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:101,reqdHacking:51,reqdReputation:4e4,repMultiplier:1.3},{name:n.b[3],nextPosition:n.b[4],baseSalary:660,charismaEffectiveness:85,charismaExpGain:.4,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:226,reqdHacking:51,reqdReputation:2e5,repMultiplier:1.5},{name:n.b[4],nextPosition:n.b[5],baseSalary:1950,charismaEffectiveness:90,charismaExpGain:1,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:501,reqdHacking:76,reqdReputation:8e5,repMultiplier:1.6},{name:n.b[5],nextPosition:null,baseSalary:3900,charismaEffectiveness:90,charismaExpGain:1.5,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:751,reqdHacking:101,reqdReputation:32e5,repMultiplier:1.75},{name:n.h[0],nextPosition:n.h[1],baseSalary:82,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.04,reqdHacking:11,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1},{name:n.h[1],nextPosition:null,baseSalary:460,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.1,reqdHacking:101,reqdStrength:301,reqdDefense:301,reqdDexterity:301,reqdAgility:301,reqdCharisma:151,reqdReputation:36e3,repMultiplier:1.25},{name:n.h[2],nextPosition:n.h[3],baseSalary:50,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.01,strengthExpGain:.04,defenseExpGain:.04,dexterityExpGain:.04,agilityExpGain:.04,charismaExpGain:.02,reqdStrength:51,reqdDefense:51,reqdDexterity:51,reqdAgility:51,reqdCharisma:1,repMultiplier:1},{name:n.h[3],nextPosition:n.h[4],baseSalary:195,hackingEffectiveness:10,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:10,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.05,reqdHacking:26,reqdStrength:151,reqdDefense:151,reqdDexterity:151,reqdAgility:151,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1.1},{name:n.h[4],nextPosition:n.h[5],baseSalary:660,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.02,strengthExpGain:.12,defenseExpGain:.12,dexterityExpGain:.12,agilityExpGain:.12,charismaExpGain:.1,reqdHacking:26,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:101,reqdReputation:36e3,repMultiplier:1.25},{name:n.h[5],nextPosition:null,baseSalary:1320,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.05,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.15,reqdHacking:51,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:151,reqdReputation:144e3,repMultiplier:1.4},{name:n.a[0],nextPosition:n.a[1],baseSalary:330,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:20,hackingExpGain:.04,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.05,reqdHacking:101,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:101,reqdReputation:8e3,repMultiplier:1},{name:n.a[1],nextPosition:n.a[2],baseSalary:990,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.1,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.1,reqdHacking:201,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:201,reqdReputation:32e3,repMultiplier:1.25},{name:n.a[2],nextPosition:null,baseSalary:2e3,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.15,strengthExpGain:.2,defenseExpGain:.2,dexterityExpGain:.2,agilityExpGain:.2,charismaExpGain:.15,reqdHacking:251,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:251,reqdReputation:162e3,repMultiplier:1.5},{name:n.e[0],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.05,repMultiplier:1},{name:n.e[1],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.04,repMultiplier:1},{name:n.k[0],nextPosition:n.k[1],baseSalary:66,hackingEffectiveness:80,charismaEffectiveness:20,hackingExpGain:.08,charismaExpGain:.03,reqdHacking:51,repMultiplier:1},{name:n.k[1],nextPosition:null,baseSalary:132,hackingEffectiveness:75,charismaEffectiveness:25,hackingExpGain:.25,charismaExpGain:.06,reqdHacking:251,reqdCharisma:51,repMultiplier:1.2},{name:n.c[0],nextPosition:n.c[1],baseSalary:66,hackingEffectiveness:20,charismaEffectiveness:80,hackingExpGain:.015,charismaExpGain:.15,reqdHacking:6,reqdCharisma:51,repMultiplier:1},{name:n.c[1],nextPosition:null,baseSalary:525,hackingEffectiveness:15,charismaEffectiveness:85,hackingExpGain:.015,charismaExpGain:.3,reqdHacking:51,reqdCharisma:226,repMultiplier:1.2},{name:n.g[0],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.04,repMultiplier:1},{name:n.g[1],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.03,repMultiplier:1}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(52),i=a(324),o=a(645);class s extends o.a{constructor(e){super(e),this.closePopup=this.closePopup.bind(this)}closePopup(){let e;this.props.onClose&&this.props.onClose(),e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup,e instanceof HTMLElement&&(r.unmountComponentAtNode(e),Object(i.a)(e))}render(){const e=this.props.class?this.props.class:"std-button";return n.createElement("button",{className:e,onClick:this.closePopup,style:this.props.style},this.props.text)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(52),i=a(73),o=a(324);class s extends n.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.keyListener=this.keyListener.bind(this)}componentDidMount(){document.addEventListener("keydown",this.keyListener)}componentWillUnmount(){document.removeEventListener("keydown",this.keyListener)}handleClick(){let e;this.props.onClose&&this.props.onClose(),e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup,e instanceof HTMLElement&&(r.unmountComponentAtNode(e),Object(o.a)(e))}keyListener(e){e.keyCode===i.a.ESC&&this.handleClick()}render(){const e=this.props.class?this.props.class:"std-button";return n.createElement("button",{className:e,onClick:this.handleClick,style:this.props.style},this.props.text)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(22);function s(e){function t(){return["NiteSec","The Black Hand"].includes(e.facName)}function a(){e.p.startGang(e.facName,t()),Object(i.b)(e.popupId),e.engine.loadGangContent()}return r.a.createElement(r.a.Fragment,null,"Would you like to create a new Gang with ",e.facName,"?",r.a.createElement("br",null),r.a.createElement("br",null),"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.",r.a.createElement("br",null),r.a.createElement("br",null),t()?"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare is not as important.":"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. Compared to hacking gangs, progression with combat gangs can be more difficult as territory management is more important. However, well-managed combat gangs can progress faster than hacking ones.",r.a.createElement("br",null),r.a.createElement("br",null),"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.",r.a.createElement("div",{className:"popup-box-input-div"},r.a.createElement(o.a,{onClick:a,onKeyUp:function(e){13===e.keyCode&&a()},text:"Create Gang",style:{float:"right"},autoFocus:!0})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(84),o=a(17);function s(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"You have received a faction invitation."),r.a.createElement("p",null,"Would you like to join ",e.faction.name,"? ",r.a.createElement("br",null),r.a.createElement("br",null),"Warning: Joining this faction may prevent you from joining other factions during this run!"),r.a.createElement("button",{className:"std-button",onClick:function(){-1===e.player.factionInvitations.findIndex(t=>t===e.faction.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(i.e)(e.faction),Object(o.b)(e.popupId)}},"Join!"),r.a.createElement("button",{className:"std-button",onClick:()=>Object(o.b)(e.popupId)},"Decide later"))}},function(e,t,a){"use strict";function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}a.d(t,"a",(function(){return r}));class r{constructor(e){n(this,"costPerLevel",0),n(this,"desc",""),n(this,"hasTargetServer",!1),n(this,"name",""),n(this,"value",0),n(this,"effectText",()=>null),null!=e.cost&&(this.cost=e.cost),null!=e.effectText&&(this.effectText=e.effectText),this.costPerLevel=e.costPerLevel,this.desc=e.desc,this.hasTargetServer=!!e.hasTargetServer&&e.hasTargetServer,this.name=e.name,this.value=e.value}getCost(e){return"number"==typeof this.cost?this.cost:Math.round((e+1)*this.costPerLevel)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(2),o=a(11);const s=[{cost:4,costPerLevel:4,desc:"Sell hashes for $1m",name:"Sell for Money",effectText:e=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e6*e})),value:1e6},{costPerLevel:100,desc:"Sell hashes for $1b in Corporation funds",name:"Sell for Corporation Funds",effectText:e=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e9*e})," Corporation funds."),value:1e9},{costPerLevel:50,desc:"Use hashes to decrease the minimum security of a single server by 2%. Note that a server's minimum security cannot go below 1. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Reduce Minimum Security",value:.98},{costPerLevel:50,desc:"Use hashes to increase the maximum amount of money on a single server by 2%. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Increase Maximum Money",value:1.02},{costPerLevel:50,desc:"Use hashes to improve the experience earned when studying at a university by 20%. This effect persists until you install Augmentations",name:"Improve Studying",effectText:e=>r.a.createElement(r.a.Fragment,null,"Improves studying by ",20*e,"%"),value:20},{costPerLevel:50,desc:"Use hashes to improve the experience earned when training at the gym by 20%. This effect persists until you install Augmentations",name:"Improve Gym Training",effectText:e=>r.a.createElement(r.a.Fragment,null,"Improves training by ",20*e,"%"),value:20},{costPerLevel:200,desc:"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries",name:"Exchange for Corporation Research",effectText:e=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",e,"k Scientific Research in your industries."),value:1e3},{costPerLevel:250,desc:"Exchange hashes for 100 Bladeburner Rank",name:"Exchange for Bladeburner Rank",effectText:e=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(100*e,"0a")," Bladeburner rank"),value:100},{costPerLevel:250,desc:"Exchanges hashes for 10 Bladeburner Skill Points",name:"Exchange for Bladeburner SP",effectText:e=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(10*e,"0a")," Bladeburner Skill Points"),value:10},{costPerLevel:200,desc:"Generate a random Coding Contract somewhere on the network",name:"Generate Coding Contract",effectText:e=>r.a.createElement(r.a.Fragment,null,"Generated ",e," contracts."),value:1}]},function(e,t,a){"use strict";function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}a.d(t,"a",(function(){return r}));class r{constructor(e){n(this,"parent",null),n(this,"stopFlag",!1),n(this,"vars",{}),e instanceof r&&(this.vars=Object.assign({},e.vars)),this.parent=e}lookup(e){let t=this;for(;t;){if(Object.prototype.hasOwnProperty.call(t.vars,e))return t;t=t.parent}return null}get(e){if(e in this.vars)return this.vars[e];throw new Error("Undefined variable "+e)}set(e,t){const a=this.lookup(e);return null!==a?a.vars[e]=t:this.vars[e]=t}def(e,t){return this.vars[e]=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return se}));var n=a(243),r=a(85),i=a(122),o=a(55),s=a(76),l=a(83),c=a(5),u=a(27),m=a(88),h=a(370),p=a(208),d=a(49),f=a(166),g=a(371),y=a(35),b=a(499),E=a(51),v=a(33),k=a(140),_=a(78),C=a(2),w=a(12),S=a(652),x=a(653),O=a(654),T=a(655),M=a(656),P=a(657),A=a(658),R=a(659),N=a(660),I=a(663),j=a(500),F=a(664),D=a(665),B=a(666),L=a(667),G=a(668),W=a(669),H=a(670),U=a(501),q=a(671),K=a(672),$=a(673),z=a(674),Y=a(675),V=a(676),J=a(502),Q=a(503),X=a(679),Z=a(680),ee=a(681),te=a(682),ae=a(683),ne=a(684),re=a(685),ie=a(686);function oe(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class se{constructor(){oe(this,"hasChanges",!1),oe(this,"action",null),oe(this,"commandHistory",[]),oe(this,"commandHistoryIndex",0),oe(this,"outputHistory",[new n.b("Bitburner v"+c.a.Version,"primary")]),oe(this,"contractOpen",!1),oe(this,"currDir","/")}process(e,t){null!==this.action&&(this.action.timeLeft-=c.a._idleSpeed*t/1e3,this.hasChanges=!0,this.action.timeLeft<0&&this.finishAction(e,!1))}pollChanges(){return!!this.hasChanges&&(this.hasChanges=!1,!0)}append(e){this.outputHistory.push(e),this.outputHistory.length>v.a.MaxTerminalCapacity&&this.outputHistory.slice(this.outputHistory.length-v.a.MaxTerminalCapacity)}print(e){this.append(new n.b(e,"primary")),this.hasChanges=!0}error(e){this.append(new n.b(e,"error")),this.hasChanges=!0}startHack(e){this.startAction(Object(_.d)(e.getCurrentServer(),e)/4,"h")}startBackdoor(e){this.startAction(Object(_.d)(e.getCurrentServer(),e)/4,"b")}startAnalyze(){this.print("Analyzing system..."),this.startAction(1,"a")}startAction(e,t){this.action=new n.c(e,t)}finishHack(e,t=!1){if(t)return;const a=e.getCurrentServer(),n=Object(_.b)(a,e),r=Math.random(),o=Object(_.c)(a,e),s=o/4;if(r=n.getMaxNumTries()?(this.print("Contract

FAILED

- Contract is now self-destructing"),a.removeContract(n)):this.print(`Contract

FAILED

- ${n.getMaxNumTries()-n.tries} tries remaining`);break;case s.b.Cancelled:default:this.print("Contract cancelled")}this.contractOpen=!1}executeScanAnalyzeCommand(e,t=1,a=!1){this.print("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),this.print(" ");const i={};for(const e in u.b)i[e]=0;const s=[],l=[0],c=e.getCurrentServer();for(s.push(c);0!=s.length;){const c=s.pop();if(!c)continue;const u=l.pop();if(void 0===u)continue;const m=c instanceof r.a;if(!a&&c.purchasedByPlayer&&"home"!=c.hostname)continue;if(i[c.ip]||u>t)continue;if(!a&&m)continue;i[c.ip]=1;for(let e=c.serversOnNetwork.length-1;e>=0;--e){const t=Object(y.c)(c,e);null!==t&&(s.push(t),l.push(u+1))}if(0==u)continue;const h=Array(4*(u-1)+1).join("-");e.hasProgram(o.a.AutoLink.name)?this.append(new n.a(c.hostname)):this.print(c.hostname);const p=h+"--";let d="NO";c.hasAdminRights&&(d="YES"),this.print(`${p}Root Access: ${d}${m?"":", Required hacking skill: "+c.requiredHackingSkill}`),c.hasOwnProperty("numOpenPortsRequired")&&this.print(p+"Number of open ports required to NUKE: "+c.numOpenPortsRequired),this.print(p+"RAM: "+C.a.formatRAM(c.maxRam)),this.print(" ")}const m=document.getElementsByClassName("scan-analyze-link");for(let t=0;t{const a=m[t].innerHTML.toString();m[t].addEventListener("onclick",()=>{null===this.action&&this.connectToServer(e,a)})})()}connectToServer(e,t){const a=Object(y.b)(t);null!=a?(e.getCurrentServer().isConnectedTo=!1,e.currentServer=a.ip,e.getCurrentServer().isConnectedTo=!0,this.print("Connected to "+a.hostname),this.setcwd("/"),"darkweb"==e.getCurrentServer().hostname&&Object(h.b)()):this.error("Invalid server. Connection failed.")}executeCommands(e,t,a){a=(a=a.trim()).replace(/\s\s+/g," "),this.commandHistory[this.commandHistory.length-1]!=a&&(this.commandHistory.push(a),this.commandHistory.length>50&&this.commandHistory.splice(0,1)),this.commandHistoryIndex=this.commandHistory.length;const n=Object(b.b)(a);for(let a=0;athis.print(e)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalLs:1===n.length&&"ls"==n[0]?(Object(U.a)(this,e,t,r,n.slice(1)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalScan:1===n.length&&"scan"==n[0]?(Object(Q.a)(this,e,t,r,n.slice(1)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalScanAnalyze1:1==n.length&&"scan-analyze"==n[0]?(this.executeScanAnalyzeCommand(t,1),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalScanAnalyze2:2==n.length&&"scan-analyze"==n[0]&&2===n[1]?(this.executeScanAnalyzeCommand(t,2),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalConnect:if(2==n.length){if("connect"!=n[0]||"n00dles"!=n[1]&&n[1]!=a.ip)return void this.print("Wrong command! Try again!");t.getCurrentServer().isConnectedTo=!1,t.currentServer=a.ip,t.getCurrentServer().isConnectedTo=!0,this.print("Connected to n00dles"),Object(d.b)()}else this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalAnalyze:if(1===n.length&&"analyze"===n[0]){if(1!==n.length)return void this.print("Incorrect usage of analyze command. Usage: analyze");this.startAnalyze(),Object(d.b)()}else this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalNuke:2==n.length&&"run"==n[0]&&"NUKE.exe"==n[1]?(a.hasAdminRights=!0,this.print("NUKE successful! Gained root access to n00dles"),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalManualHack:1==n.length&&"hack"==n[0]?(this.startHack(t),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalCreateScript:2==n.length&&"nano"==n[0]&&"n00dles.script"==n[1]?(e.loadScriptEditorContent("n00dles.script",""),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalFree:1==n.length&&"free"==n[0]?(Object(j.a)(this,e,t,r,n.slice(1)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.TerminalRunScript:2==n.length&&"run"==n[0]&&"n00dles.script"==n[1]?(Object(J.a)(this,e,t,r,n.slice(1)),Object(d.b)()):this.print("Bad command. Please follow the tutorial");break;case d.d.ActiveScriptsToTerminal:if(2==n.length&&"tail"==n[0]&&"n00dles.script"==n[1]){const e=Object(f.a)("n00dles.script",[],t.getCurrentServer());if(null==e)return void this.print("Error: No such script exists");Object(p.a)(e),Object(d.b)()}else this.print("Bad command. Please follow the tutorial");break;default:return void this.print("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}return}const i=n[0];if("number"==typeof i)return void this.error(`Command ${n[0]} not found`);const o={alias:S.a,analyze:x.a,backdoor:O.a,buy:T.a,cat:M.a,cd:P.a,check:A.a,cls:()=>this.clear(),clear:()=>this.clear(),connect:R.a,download:N.a,expr:I.a,free:j.a,hack:F.a,help:D.a,home:B.a,hostname:L.a,ifconfig:G.a,kill:W.a,killall:H.a,ls:U.a,lscpu:q.a,mem:K.a,mv:$.a,nano:z.a,ps:Y.a,rm:V.a,run:J.a,scan:Q.a,"scan-analyze":X.a,scp:Z.a,sudov:ee.a,tail:te.a,theme:ae.a,top:ne.a,unalias:re.a,wget:ie.a}[i.toLowerCase()];o?o(this,e,t,r,n.slice(1)):this.error(`Command ${n[0]} not found`)}getProgressText(){if(null===this.action)throw new Error("trying to get the progress text when there's no action");return Object(k.a)({progress:(this.action.time-this.action.timeLeft)/this.action.time,totalTicks:50})}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(89);function r(e,t,a,r,i){0!==i.length?1===i.length&&Object(n.e)(i[0]+"")?e.print("Set alias "+i[0]):2===i.length&&"-g"===i[0]&&Object(n.e)(i[1]+"",!0)?e.print("Set global alias "+i[1]):e.error('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]'):Object(n.f)()}},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?e.startAnalyze():e.print("Incorrect usage of analyze command. Usage: analyze")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(90),r=a(85);function i(e,t,a,i,o){if(0!==o.length)return void e.print("Incorrect usage of backdoor command. Usage: backdoor");i instanceof n.a||e.error("Can only backdoor normal servers");const s=i;s.purchasedByPlayer?e.error("Cannot use backdoor on your own machines! You are currently connected to your home PC or one of your purchased servers"):s.hasAdminRights?s.requiredHackingSkill>a.hacking_skill?e.error("Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof r.a?e.error("Cannot use backdoor on this type of Server"):e.startBackdoor(a):e.error("You do not have admin rights for this machine! Cannot backdoor")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(370),r=a(51);function i(e,t,a,i,o){if(!r.a.hasOwnProperty("Darkweb Server"))return void e.error("You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)");if(1!=o.length)return e.print("Incorrect number of arguments. Usage: "),e.print("buy -l"),void e.print("buy [item name]");const s=o[0]+"";"-l"==s||"-1"==s||"--list"==s?Object(n.c)():Object(n.a)(s)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(129),r=a(95),i=a(413);function o(e,t,a,o,s){if(1!==s.length)return void e.error("Incorrect usage of cat command. Usage: cat [file]");const l=e.getFilepath(s[0]+"");if(l.endsWith(".msg")||l.endsWith(".lit")||l.endsWith(".txt")){if(l.endsWith(".msg")||l.endsWith(".lit"))for(let e=0;e1)e.error("Incorrect number of arguments. Usage: cd [dir]");else{let t=1===i.length?i[0]+"":"/",r="";if("/"===t)r="/";else{if(t=Object(n.i)(t),r=Object(n.a)(t,e.cwd()),null===r||""===r)return void e.error("Invalid path. Failed to change directories");const i=a.getCurrentServer();if(!i.scripts.some(e=>e.filename.startsWith(r+""))&&!i.textFiles.some(e=>e.fn.startsWith(r+"")))return void e.error("Invalid path. Failed to change directories")}e.setcwd(r)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(166),r=a(83);function i(e,t,a,i,o){if(o.length<1)e.error("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const t=e.getFilepath(o[0]+"");if(!Object(r.a)(t))return void e.error("tail can only be called on .script files (filename must end with .script)");const a=Object(n.a)(t,o.slice(1),i);if(null==a)return void e.error("No such script exists");a.displayLog()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(35);function r(e,t,a,r,i){if(1!==i.length)return void e.error("Incorrect usage of connect command. Usage: connect [ip/hostname]");const o=i[0]+"";for(let t=0;ti.a.saveAs(e,a))}if(Object(n.a)(t)){const n=e.getScript(a,t);if(null!=n)return n.download()}else{if(!t.endsWith(".txt"))return void e.error("Cannot download this filetype");{const n=e.getTextFile(a,t);if(null!=n)return n.download()}}return void e.error(t+" does not exist")}catch(t){return void e.error(t+"")}}},,,function(module,__webpack_exports__,__webpack_require__){"use strict";function expr(terminal,engine,player,server,args){if(0===args.length)return void terminal.error("Incorrect usage of expr command. Usage: expr [math expression]");const expr=args.join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,"");let result;try{result=eval(sanitizedExpr)}catch(e){return void terminal.error("Could not evaluate expression: "+sanitizedExpr)}terminal.print(result)}__webpack_require__.d(__webpack_exports__,"a",(function(){return expr}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(90);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of hack command. Usage: hack");r instanceof n.a||e.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers");const o=r;o.purchasedByPlayer?e.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):o.hasAdminRights?o.requiredHackingSkill>a.hacking_skill?e.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):e.startHack(a):e.error("You do not have admin rights for this machine! Cannot hack")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(371);function r(e,t,a,r,i){if(0===i.length||1===i.length)if(0===i.length)n.b.forEach(t=>e.print(t));else{const t=i[0],a=n.a[t];if(null==a)return void e.error("No help topics match '"+t+"'");a.forEach(t=>e.print(t))}else e.error("Incorrect usage of help command. Usage: help")}},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?(a.getCurrentServer().isConnectedTo=!1,a.currentServer=a.getHomeComputer().ip,a.getCurrentServer().isConnectedTo=!0,e.print("Connected to home"),e.setcwd("/")):e.error("Incorrect usage of home command. Usage: home")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?e.print(a.getCurrentServer().hostname):e.error("Incorrect usage of hostname command. Usage: hostname")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?e.print(a.getCurrentServer().ip):e.error("Incorrect usage of ifconfig command. Usage: ifconfig")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(99);function r(e,t,a,r,i){try{if(i.length<1)return void e.error("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("number"==typeof i[0]){const t=i[0];return void(Object(n.a)(t)?e.print("Killing script with PID "+t):e.print(`Failed to kill script with PID ${t}. No such script exists`))}const t=e.getFilepath(i[0]),a=r.getRunningScript(t,i.slice(1));if(null==a)return void e.error("No such script is running. Nothing to kill");Object(n.a)(a,r.ip,!1),e.print("Killing "+t)}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(99),r=a(207);function i(e,t,a,i){for(let e=i.runningScripts.length-1;e>=0;--e)Object(n.a)(i.runningScripts[e],i.ip,!1);r.a.emitEvent(),e.print("Killing all running scripts")}},function(e,t,a){"use strict";function n(e,t,a){e.print(a.getCurrentServer().cpuCores+" Core(s)")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(2);function r(e,t,a,r,i){try{if(1!==i.length&&3!==i.length)return void e.error("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");const t=i[0]+"";let r=1;if(3===i.length&&"-t"===i[1]&&(r=Math.round(parseInt(i[2]+"")),isNaN(r)||r<1))return void e.error("Invalid number of threads specified. Number of threads must be greater than 1");const o=e.getScript(a,t);if(null==o)return void e.error("No such script exists!");const s=o.ramUsage*r;e.print(`This script requires ${n.a.formatRAM(s)} of RAM to run for ${r} thread(s)`)}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(83),r=a(195);function i(e,t,a,i,o){if(2===o.length)try{const t=o[0]+"",s=o[1]+"";if(!Object(n.a)(t)&&!t.endsWith(".txt"))return void e.error("'mv' can only be used on scripts and text files (.txt)");const l=e.getFile(a,t);if(null==l)return void e.error(`Source file ${t} does not exist`);const c=e.getFilepath(t),u=e.getFilepath(s),m=e.getFile(a,s);if(Object(n.a)(t)){const t=l;if(!Object(n.a)(s))return void e.error("Source and destination files must have the same type");if(i.isRunning(c))return void e.error("Cannot use 'mv' on a script that is running");if(null!=m){if(!i.removeFile(u).res)return void e.error("Something went wrong...please contact game dev (probably a bug)");e.print("Warning: The destination file was overwritten")}t.filename=u}else if(l instanceof r.a){const t=l;if(!s.endsWith(".txt"))return void e.error("Source and destination files must have the same type");if(null!=m){if(!i.removeFile(u).res)return void e.error("Something went wrong...please contact game dev (probably a bug)");e.print("Warning: The destination file was overwritten")}t.fn=u}}catch(t){e.error(t+"")}else e.error("Incorrect number of arguments. Usage: mv [src] [dest]")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(83),r=a(295);function i(e,t,a,i,o){if(1===o.length)try{const i=o[0]+"";if(".fconf"===i){const e=Object(r.a)();return void t.loadScriptEditorContent(i,e)}if(Object(n.a)(i)){const n=e.getFilepath(i),r=e.getScript(a,i);if(null==r){let e="";(i.endsWith(".ns")||i.endsWith(".js"))&&(e="export async function main(ns) {\n\n}"),t.loadScriptEditorContent(n,e)}else t.loadScriptEditorContent(n,r.code)}else{if(!i.endsWith(".txt"))return void e.error("Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");{const n=e.getFilepath(i),r=e.getTextFile(a,i);null==r?t.loadScriptEditorContent(n):t.loadScriptEditorContent(n,r.text)}}}catch(t){e.error(t+"")}else e.error("Incorrect usage of nano command. Usage: nano [scriptname]")}},function(e,t,a){"use strict";function n(e,t,a,n,r){if(0===r.length)for(let t=0;t0?p:1,g=h._;if(null==Object(o.a)(u,g,l)){for(let t=0;ts)return void e.print("This machine does not have enough RAM to run this script with "+f+" threads. Script requires "+o+"GB of RAM");const c=new i.a(a,g);c.threads=f;return Object(r.e)(c,l)?(e.print(`Running script with ${f} thread(s), pid ${c.pid} and args: ${JSON.stringify(g)}.`),void(d&&Object(n.a)(c))):void e.error("Failed to start script")}e.print("ERROR: No such script")}else e.print("ERROR: This script is already running. Cannot run multiple instances")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(55);function r(e,t,a,r,i){if(i.length<1)return;const o=i[0]+"";if(a.hasProgram(o)){if(!(i.length<1)){for(const t of Object.values(n.a))if(t.name===o)return void t.run(e,a,r,i.slice(1).map(e=>e+""));e.print("Invalid executable. Cannot be run")}}else e.error("No such executable on home computer (Only programs that exist on your home computer can be run)")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(55);function r(e,t,a,r,i){if(0===i.length)e.executeScanAnalyzeCommand(a,1);else{if(i.length>2)return void e.error("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let t=!1;2===i.length&&"-a"===i[1]&&(t=!0);const r=parseInt(i[0]+"");if(isNaN(r)||r<0)return void e.error("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(r>3&&!a.hasProgram(n.a.DeepscanV1.name)&&!a.hasProgram(n.a.DeepscanV2.name))return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(r>5&&!a.hasProgram(n.a.DeepscanV2.name))return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(r>10)return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 10");e.executeScanAnalyzeCommand(a,r,t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(95),r=a(35),i=a(83);function o(e,t,a,o,s){try{if(2!==s.length)return void e.error("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const t=e.getFilepath(s[0]+"");if(!t.endsWith(".lit")&&!Object(i.a)(t)&&!t.endsWith(".txt"))return void e.error("scp only works for scripts, text files (.txt), and literature files (.lit)");const a=Object(r.b)(s[1]+"");if(null==a)return void e.error(`Invalid destination. ${s[1]} not found`);if(t.endsWith(".lit")){let r=!1;for(let e=0;e1){e.error("Found several potential candidates:");for(const t of r)e.error(`${t.filename} ${t.args.join(" ")}`);return void e.error("Script arguments need to be specified.")}e.error("No such script exists.")}else{const t=Object(r.b)(l[0],s);if(null==t)return void e.error("No such script exists");Object(n.a)(t)}}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(63);function r(e,t,a,r,i){if(1!==i.length&&3!==i.length)e.error("Incorrect number of arguments."),e.error("Usage: theme [default|muted|solarized] | #[background color hex] #[text color hex] #[highlight color hex]");else if(1===i.length){const t=i[0];if("default"==t)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#000000"),document.body.style.setProperty("--my-prompt-color","#f92672");else if("muted"==t)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#252527");else{if("solarized"!=t)return e.error("Theme not found");document.body.style.setProperty("--my-highlight-color","#6c71c4"),document.body.style.setProperty("--my-font-color","#839496"),document.body.style.setProperty("--my-background-color","#002b36")}n.a.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),n.a.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),n.a.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color"),n.a.THEME_PROMPT_COLOR=document.body.style.getPropertyValue("--my-prompt-color")}else{const t=i[0]+"",a=i[1]+"",r=i[2]+"";if(!(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r)))return e.error("Invalid Hex Input for theme");document.body.style.setProperty("--my-highlight-color",r),document.body.style.setProperty("--my-font-color",a),document.body.style.setProperty("--my-background-color",t),n.a.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),n.a.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),n.a.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(420),r=a(2);function i(e,t,a,i,o){if(0!==o.length)return void e.error("Incorrect usage of top command. Usage: top");const s=`Script${" ".repeat(40-"Script".length)}PID${" ".repeat(10-"PID".length)}Threads${" ".repeat(16-"Threads".length)}RAM Usage`;e.print(s);const l=i.runningScripts;for(let t=0;t=this.getMaximumNumberProducts()}calculateProductionFactors(){let e=0;for(let t=0;t<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++t){const a=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[t],n=this.warehouses[a];if(!(n instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a))continue;const r=n.materials,i=Math.pow(.002*r.RealEstate.qty+1,this.reFac)*Math.pow(.002*r.Hardware.qty+1,this.hwFac)*Math.pow(.002*r.Robots.qty+1,this.robFac)*Math.pow(.002*r.AICores.qty+1,this.aiFac);e+=Math.pow(i,.73)}this.prodMult=e<1?1:e}updateWarehouseSizeUsed(e){e.updateMaterialSizeUsed();for(const t in this.products)if(this.products.hasOwnProperty(t)){const a=this.products[t];if(void 0===a)continue;e.sizeUsed+=a.data[e.loc][0]*a.siz,a.data[e.loc][0]>0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__.c)(a.data[e.loc][0]*a.siz,0)+"
")}}process(e=1,t,a){if(this.state=t,"START"===t){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);let t=0;for(const n in this.offices){const r=this.offices[n];0!==r&&(r instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(t+=r.process(e,a,this)))}this.thisCycleExpenses=this.thisCycleExpenses.plus(t),this.processMaterialMarket(),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);const n=a.getDreamSenseGain(),r=4*n;return void(n>0&&(this.popularity+=n*e,this.awareness+=r*e))}let n=this.processMaterials(e,a);Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1])),n=this.processProducts(e,a),Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1]))}processMaterialMarket(){const e=this.reqMats,t=this.prodMats;for(let a=0;a<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++a)if(this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a){const n=this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]];if(0===n)continue;for(const t in e)e.hasOwnProperty(t)&&n.materials[t].processMarket();for(let e=0;e0&&(t.qty+=a,expenses+=a*t.bCost),this.updateWarehouseSizeUsed(warehouse))}const e={};for(const t in warehouse.materials){if(!warehouse.materials.hasOwnProperty(t))continue;if(!warehouse.smartSupplyEnabled||!Object.keys(this.reqMats).includes(t))continue;const a=warehouse.materials[t],n=this.reqMats[t];if(void 0===n)throw new Error(`reqMat "${t}" is undefined`);a.buy=n*warehouse.smartSupplyStore;let r=a.buy*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;const i=Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[t]);r=Math.min(r,i),r>0&&(e[t]=r)}let t=1e99;for(const a in e){const n=e[a];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");const r=this.reqMats[a];if(void 0===r)throw new Error(`reqMat "${a}" is undefined`);const i=n/r;in)for(const t in e){const r=e[t];if(void 0===r)throw new Error("Somehow smartbuy matname is undefined");e[t]=Math.floor(r*n/a)}for(const t in e){if(!warehouse.smartSupplyUseLeftovers[t])continue;const a=warehouse.materials[t],n=e[t];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");e[t]=Math.max(0,n-a.qty)}for(const t in e){const a=warehouse.materials[t],n=e[t];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");a.qty+=n,expenses+=n*a.bCost}break}case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){const e=warehouse.materials[this.prodMats[0]],t=this.getOfficeProductivity(office)*this.prodMult*corporation.getProductionMultiplier()*this.getProductionMultiplier();let a;a=e.prdman[0]?Math.min(t,e.prdman[1]):t,a*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;let n=0;for(let e=0;e0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/n);a=Math.min(e,a)}a<0&&(a=0),warehouse.smartSupplyStore+=a/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);let r=1;for(const e in this.reqMats)if(this.reqMats.hasOwnProperty(e)){const t=this.reqMats[e];if(void 0===t)continue;const n=t*a;warehouse.materials[e].qty0&&a>0){for(const e in this.reqMats){const t=this.reqMats[e];if(void 0===t)continue;const n=t*a*r;warehouse.materials[e].qty-=n,warehouse.materials[e].prd=0,warehouse.materials[e].prd-=n/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)}for(let e=0;emat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(const matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];mat.totalExp=0;for(let expI=0;expI=a.size)return[0,0];{const e=Math.floor((a.size-a.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[matName]);amt=Math.min(e,amt)}a.materials[matName].imp+=amt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles),a.materials[matName].qty+=amt,a.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,t.updateWarehouseSizeUsed(a);break}}}mat.totalExp/=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error("Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.RandD],.5)*corporation.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}}return[revenue,expenses]}processProducts(e=1,t){let a=0;if("PRODUCTION"===this.state)for(const t in this.products){const a=this.products[t];if(void 0!==a&&!a.fin){const t=a.createCity,n=this.offices[t];if(0===n)continue;const r=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Engineer],i=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Management],o=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;a.createProduct(e,c),a.prog>=100&&a.finishProduct(n.employeeProd,this);break}}for(const n in this.products)if(this.products.hasOwnProperty(n)){const r=this.products[n];r instanceof _Product__WEBPACK_IMPORTED_MODULE_10__.a&&r.fin&&(a+=this.processProduct(e,r,t))}return[a,0]}processProduct(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a)switch(this.state){case"PRODUCTION":{const e=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let t;t=product.prdman[city][0]?Math.min(e,product.prdman[city][1]):e,t*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;let a=product.siz;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const t=product.reqMats[e];a-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[e]*t}if(a>0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/a);t=Math.min(e,t)}warehouse.smartSupplyStore+=t/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);let n=1;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const a=product.reqMats[e]*t;warehouse.materials[e].qty0&&t>0){for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const a=product.reqMats[e]*t*n;warehouse.materials[e].qty-=a,warehouse.materials[e].prd-=a/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=t*n}product.data[city][1]=t*n/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);break}case"SALE":{product.pCost=0;for(const e in product.reqMats)product.reqMats.hasOwnProperty(e)&&(product.pCost+=product.reqMats[e]*warehouse.materials[e].bCost);product.pCost*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;let sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,a=e,n=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(a/n);let i;0===n||0===r?0===a?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else if(product.marketTa1)sCost=product.pCost+markupLimit;else if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sCost)){const sCostString=product.sCost;0===product.mku&&(console.error("mku is zero, reverting to 1 to avoid Infinity"),product.mku=1),sCost=sCostString.replace(/MP/g,product.pCost+product.rat/product.mku+""),sCost=eval(sCost)}else sCost=product.sCost;let markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));const maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier();let sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error("Invalid State: "+this.state)}}return totalProfit}discontinueProduct(e){for(const t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]}upgrade(e,t){const a=t.corporation,n=t.office,r=e[0];for(;this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let e=0;e=1)&&console.warn(`Exponential factor is ${t}. This is not an intended value for it`),a<1&&console.warn(`Linear factor is ${a}. This is not an intended value for it`),Math.pow(e,t)+e/a}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(41);const r={[n.a.Food]:{Quality:.7,Durability:.1,Aesthetics:.2},[n.a.Tobacco]:{Quality:.4,Durability:.2,Reliability:.2,Aesthetics:.2},[n.a.Pharmaceutical]:{Quality:.2,Performance:.2,Durability:.1,Reliability:.3,Features:.2},[n.a.Computer]:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},Computer:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},[n.a.Robotics]:{Quality:.1,Performance:.2,Durability:.2,Reliability:.2,Aesthetics:.1,Features:.2},[n.a.Software]:{Quality:.2,Performance:.2,Reliability:.2,Durability:.2,Features:.2},[n.a.Healthcare]:{Quality:.4,Performance:.1,Durability:.1,Reliability:.3,Features:.1},[n.a.RealEstate]:{Quality:.2,Durability:.25,Reliability:.1,Aesthetics:.35,Features:.1}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=[{desc:"This gang member is currently idle",isCombat:!0,isHacking:!0,name:"Unassigned",params:{hackWeight:100}},{desc:"Assign this gang member to create and distribute ransomware

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Ransomware",params:{baseRespect:5e-5,baseWanted:1e-4,baseMoney:1,hackWeight:100,difficulty:1}},{desc:"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Phishing",params:{baseRespect:8e-5,baseWanted:.003,baseMoney:2.5,hackWeight:85,chaWeight:15,difficulty:3.5}},{desc:"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Identity Theft",params:{baseRespect:1e-4,baseWanted:.075,baseMoney:6,hackWeight:80,chaWeight:20,difficulty:5}},{desc:"Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"DDoS Attacks",params:{baseRespect:4e-4,baseWanted:.2,hackWeight:100,difficulty:8}},{desc:"Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Plant Virus",params:{baseRespect:6e-4,baseWanted:.4,hackWeight:100,difficulty:12}},{desc:"Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Fraud & Counterfeiting",params:{baseRespect:4e-4,baseWanted:.3,baseMoney:15,hackWeight:80,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Money Laundering",params:{baseRespect:.001,baseWanted:1.25,baseMoney:120,hackWeight:75,chaWeight:25,difficulty:25}},{desc:"Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level",isCombat:!1,isHacking:!0,name:"Cyberterrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:80,chaWeight:20,difficulty:36}},{desc:"Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level",isCombat:!1,isHacking:!0,name:"Ethical Hacking",params:{baseWanted:-.001,baseMoney:1,hackWeight:90,chaWeight:10,difficulty:1}},{desc:"Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Mug People",params:{baseRespect:5e-5,baseWanted:5e-5,baseMoney:1.2,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}},{desc:"Assign this gang member to sell drugs

Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory",isCombat:!0,isHacking:!1,name:"Deal Drugs",params:{baseRespect:6e-5,baseWanted:.002,baseMoney:5,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3.5,territory:{money:1.2,respect:1,wanted:1.15}}},{desc:"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Strongarm Civilians",params:{baseRespect:4e-5,baseWanted:.02,baseMoney:2.5,hackWeight:10,strWeight:25,defWeight:25,dexWeight:20,agiWeight:10,chaWeight:10,difficulty:5,territory:{money:1.6,respect:1.1,wanted:1.5}}},{desc:"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:15,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:14}},{desc:"Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Armed Robbery",params:{baseRespect:14e-5,baseWanted:.1,baseMoney:38,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Traffick Illegal Arms",params:{baseRespect:2e-4,baseWanted:.24,baseMoney:58,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:25,difficulty:32,territory:{money:1.4,respect:1.3,wanted:1.25}}},{desc:"Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Threaten & Blackmail",params:{baseRespect:2e-4,baseWanted:.125,baseMoney:24,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}},{desc:"Assign this gang member to engage in human trafficking operations

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Human Trafficking",params:{baseRespect:.004,baseWanted:1.25,baseMoney:120,hackWeight:30,strWeight:5,defWeight:5,dexWeight:30,chaWeight:30,difficulty:36,territory:{money:1.5,respect:1.5,wanted:1.6}}},{desc:"Assign this gang member to commit acts of terrorism

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

Decreases wanted level",isCombat:!0,isHacking:!0,name:"Vigilante Justice",params:{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1,territory:{money:1,respect:1,wanted:.9}}},{desc:"Assign this gang member to increase their combat stats (str, def, dex, agi)",isCombat:!0,isHacking:!0,name:"Train Combat",params:{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:100}},{desc:"Assign this gang member to train their hacking skills",isCombat:!0,isHacking:!0,name:"Train Hacking",params:{hackWeight:100,difficulty:45}},{desc:"Assign this gang member to train their charisma",isCombat:!0,isHacking:!0,name:"Train Charisma",params:{chaWeight:100,difficulty:8}},{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.",isCombat:!0,isHacking:!0,name:"Territory Warfare",params:{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:5}}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(423),r=a(174),i=a(149),o=a(59),s=a(14);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class c{constructor(e=""){l(this,"task","Unassigned"),l(this,"earnedRespect",0),l(this,"hack",1),l(this,"str",1),l(this,"def",1),l(this,"dex",1),l(this,"agi",1),l(this,"cha",1),l(this,"hack_exp",0),l(this,"str_exp",0),l(this,"def_exp",0),l(this,"dex_exp",0),l(this,"agi_exp",0),l(this,"cha_exp",0),l(this,"hack_mult",1),l(this,"str_mult",1),l(this,"def_mult",1),l(this,"dex_mult",1),l(this,"agi_mult",1),l(this,"cha_mult",1),l(this,"hack_asc_points",0),l(this,"str_asc_points",0),l(this,"def_asc_points",0),l(this,"dex_asc_points",0),l(this,"agi_asc_points",0),l(this,"cha_asc_points",0),l(this,"upgrades",[]),l(this,"augmentations",[]),this.name=e}calculateSkill(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)}calculateAscensionMult(e){return Math.max(Math.pow(e/4e3,.7),1)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(e){return r.a.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof n.a&&(this.task=this.task.name),r.a.hasOwnProperty(this.task)?r.a[this.task]:r.a.Unassigned}calculateRespectGain(e){const t=this.getTask();if(0===t.baseRespect)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=4*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.respect)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 11*t.baseRespect*a*n*r}calculateWantedLevelGain(e){const t=this.getTask();if(0===t.baseWanted)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.5*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.wanted)/100);if(isNaN(n)||n<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*a*n;const r=7*t.baseWanted/Math.pow(3*a*n,.8);return Math.min(100,r)}calculateMoneyGain(e){const t=this.getTask();if(0===t.baseMoney)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.2*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.money)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 5*t.baseMoney*a*n*r}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(e=1){const t=this.getTask();if(t===r.a.Unassigned)return;const a=Math.pow(t.difficulty,.9)*e,n=this.expMult();this.hack_exp+=t.hackWeight/1500*a*n.hack,this.str_exp+=t.strWeight/1500*a*n.str,this.def_exp+=t.defWeight/1500*a*n.def,this.dex_exp+=t.dexWeight/1500*a*n.dex,this.agi_exp+=t.agiWeight/1500*a*n.agi,this.cha_exp+=t.chaWeight/1500*a*n.cha}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Math.max(this.hack_exp-1e3,0),str:Math.max(this.str_exp-1e3,0),def:Math.max(this.def_exp-1e3,0),dex:Math.max(this.dex_exp-1e3,0),agi:Math.max(this.agi_exp-1e3,0),cha:Math.max(this.cha_exp-1e3,0)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}getAscensionResults(){const e=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+e.hack)/this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points+e.str)/this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points+e.def)/this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points+e.dex)/this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points+e.agi)/this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points+e.cha)/this.calculateAscensionMult(this.cha_asc_points)}}ascend(){const e=this.getAscensionResults(),t=this.getGainedAscensionPoints();this.hack_asc_points+=t.hack,this.str_asc_points+=t.str,this.def_asc_points+=t.def,this.dex_asc_points+=t.dex,this.agi_asc_points+=t.agi,this.cha_asc_points+=t.cha,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e")}getType(){switch(this.type){case n.a.Weapon:return"Weapon";case n.a.Armor:return"Armor";case n.a.Vehicle:return"Vehicle";case n.a.Rootkit:return"Rootkit";case n.a.Augmentation:return"Augmentation";default:return""}}}},function(e,t,a){"use strict";function n(e){return!isNaN(e)&&(0!==e&&0==(e&e-1))}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(66),r=a(7);const i=[{b:!0,initPrice:{max:28e3,min:17e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.AevumECorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumECorp]},{b:!0,initPrice:{max:34e3,min:24e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.Sector12MegaCorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12MegaCorp]},{b:!0,initPrice:{max:25e3,min:12e3},marketCap:16e11,mv:{divisor:100,max:80,min:70},name:r.a.Sector12BladeIndustries,otlkMag:13,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12BladeIndustries]},{b:!0,initPrice:{max:25e3,min:1e4},marketCap:15e11,mv:{divisor:100,max:75,min:65},name:r.a.AevumClarkeIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumClarkeIncorporated]},{b:!0,initPrice:{max:43e3,min:32e3},marketCap:18e11,mv:{divisor:100,max:70,min:60},name:r.a.VolhavenOmniTekIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.VolhavenOmniTekIncorporated]},{b:!0,initPrice:{max:8e4,min:5e4},marketCap:2e12,mv:{divisor:100,max:110,min:100},name:r.a.Sector12FourSigma,otlkMag:17,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12FourSigma]},{b:!0,initPrice:{max:28e3,min:16e3},marketCap:19e11,mv:{divisor:100,max:85,min:75},name:r.a.ChongqingKuaiGongInternational,otlkMag:10,spreadPerc:{divisor:10,max:7,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.ChongqingKuaiGongInternational]},{b:!0,initPrice:{max:36e3,min:29e3},marketCap:2e12,mv:{divisor:100,max:130,min:120},name:r.a.AevumFulcrumTechnologies,otlkMag:16,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumFulcrumTechnologies]},{b:!0,initPrice:{max:25e3,min:2e4},marketCap:12e11,mv:{divisor:100,max:90,min:80},name:r.a.IshimaStormTechnologies,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.IshimaStormTechnologies]},{b:!0,initPrice:{max:19e3,min:6e3},marketCap:9e11,mv:{divisor:100,max:70,min:60},name:r.a.NewTokyoDefComm,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.NewTokyoDefComm]},{b:!0,initPrice:{max:18e3,min:1e4},marketCap:825e9,mv:{divisor:100,max:65,min:55},name:r.a.VolhavenHeliosLabs,otlkMag:9,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.VolhavenHeliosLabs]},{b:!0,initPrice:{max:14e3,min:8e3},marketCap:1e12,mv:{divisor:100,max:80,min:70},name:r.a.NewTokyoVitaLife,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.NewTokyoVitaLife]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:8e11,mv:{divisor:100,max:70,min:60},name:r.a.Sector12IcarusMicrosystems,otlkMag:7.5,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.Sector12IcarusMicrosystems]},{b:!0,initPrice:{max:29e3,min:16e3},marketCap:9e11,mv:{divisor:100,max:60,min:50},name:r.a.Sector12UniversalEnergy,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.Sector12UniversalEnergy]},{b:!0,initPrice:{max:17e3,min:8e3},marketCap:64e10,mv:{divisor:100,max:65,min:55},name:r.a.AevumAeroCorp,otlkMag:6,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.AevumAeroCorp]},{b:!0,initPrice:{max:15e3,min:6e3},marketCap:6e11,mv:{divisor:100,max:75,min:65},name:r.a.VolhavenOmniaCybersystems,otlkMag:4.5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.VolhavenOmniaCybersystems]},{b:!0,initPrice:{max:28e3,min:14e3},marketCap:705e9,mv:{divisor:100,max:80,min:70},name:r.a.ChongqingSolarisSpaceSystems,otlkMag:8.5,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.ChongqingSolarisSpaceSystems]},{b:!0,initPrice:{max:3e4,min:12e3},marketCap:695e9,mv:{divisor:100,max:65,min:55},name:r.a.NewTokyoGlobalPharmaceuticals,otlkMag:10.5,spreadPerc:{divisor:10,max:10,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.NewTokyoGlobalPharmaceuticals]},{b:!0,initPrice:{max:27e3,min:15e3},marketCap:6e11,mv:{divisor:100,max:80,min:70},name:r.a.IshimaNovaMedical,otlkMag:5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.IshimaNovaMedical]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:45e10,mv:{divisor:100,max:260,min:240},name:r.a.AevumWatchdogSecurity,otlkMag:1.5,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:54e3,min:12e3},symbol:n.a[r.a.AevumWatchdogSecurity]},{b:!0,initPrice:{max:8e3,min:4500},marketCap:3e11,mv:{divisor:100,max:135,min:115},name:r.a.VolhavenLexoCorp,otlkMag:6,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.VolhavenLexoCorp]},{b:!0,initPrice:{max:7e3,min:2e3},marketCap:18e10,mv:{divisor:100,max:70,min:50},name:r.a.AevumRhoConstruction,otlkMag:1,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:6e4},symbol:n.a[r.a.AevumRhoConstruction]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:24e10,mv:{divisor:100,max:205,min:175},name:r.a.Sector12AlphaEnterprises,otlkMag:10,spreadPerc:{divisor:10,max:16,min:5},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12AlphaEnterprises]},{b:!0,initPrice:{max:8e3,min:3e3},marketCap:2e11,mv:{divisor:100,max:170,min:150},name:r.a.VolhavenSysCoreSecurities,otlkMag:3,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:9e4,min:15e3},symbol:n.a[r.a.VolhavenSysCoreSecurities]},{b:!0,initPrice:{max:6e3,min:1e3},marketCap:185e9,mv:{divisor:100,max:100,min:80},name:r.a.VolhavenCompuTek,otlkMag:4,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:6e4},symbol:n.a[r.a.VolhavenCompuTek]},{b:!0,initPrice:{max:5e3,min:1e3},marketCap:58e9,mv:{divisor:100,max:400,min:200},name:r.a.AevumNetLinkTechnologies,otlkMag:1,spreadPerc:{divisor:10,max:20,min:5},shareTxForMovement:{max:54e3,min:18e3},symbol:n.a[r.a.AevumNetLinkTechnologies]},{b:!0,initPrice:{max:8e3,min:1e3},marketCap:6e10,mv:{divisor:100,max:110,min:90},name:r.a.IshimaOmegaSoftware,otlkMag:.5,spreadPerc:{divisor:10,max:13,min:4},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.IshimaOmegaSoftware]},{b:!1,initPrice:{max:4500,min:500},marketCap:45e9,mv:{divisor:100,max:80,min:70},name:r.a.Sector12FoodNStuff,otlkMag:1,spreadPerc:{divisor:10,max:10,min:6},shareTxForMovement:{max:18e4,min:6e4},symbol:n.a[r.a.Sector12FoodNStuff]},{b:!0,initPrice:{max:3500,min:1500},marketCap:3e10,mv:{divisor:100,max:275,min:100},name:"Sigma Cosmetics",otlkMag:0,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:7e4,min:2e4},symbol:n.a["Sigma Cosmetics"]},{b:!0,initPrice:{max:1500,min:250},marketCap:42e9,mv:{divisor:100,max:350,min:200},name:"Joes Guns",otlkMag:1,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:52e3,min:15e3},symbol:n.a["Joes Guns"]},{b:!0,initPrice:{max:1500,min:250},marketCap:1e11,mv:{divisor:100,max:175,min:120},name:"Catalyst Ventures",otlkMag:13.5,spreadPerc:{divisor:10,max:14,min:5},shareTxForMovement:{max:72e3,min:24e3},symbol:n.a["Catalyst Ventures"]},{b:!0,initPrice:{max:3e4,min:15e3},marketCap:36e10,mv:{divisor:100,max:80,min:70},name:"Microdyne Technologies",otlkMag:8,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:216e3,min:9e4},symbol:n.a["Microdyne Technologies"]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:42e10,mv:{divisor:100,max:70,min:50},name:"Titan Laboratories",otlkMag:11,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:216e3,min:9e4},symbol:n.a["Titan Laboratories"]}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(696),i=a(697);class o extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.rerender=this.rerender.bind(this)}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){return n.createElement("div",{className:"stock-market-container"},n.createElement(r.a,{initStockMarket:this.props.initStockMarket,p:this.props.p,rerender:this.rerender}),this.props.p.hasWseAccount&&n.createElement(i.a,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,eventEmitterForReset:this.props.eventEmitterForReset,p:this.props.p,placeOrder:this.props.placeOrder,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stockMarket:this.props.stockMarket}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(212),i=a(5),o=a(22),s=a(219),l=a(11),c=a(9);const u={display:"block"};class m extends n.Component{constructor(e){super(e),this.handleClick4SMarketDataHelpTip=this.handleClick4SMarketDataHelpTip.bind(this),this.purchaseWseAccount=this.purchaseWseAccount.bind(this),this.purchaseTixApiAccess=this.purchaseTixApiAccess.bind(this),this.purchase4SMarketData=this.purchase4SMarketData.bind(this),this.purchase4SMarketDataTixApiAccess=this.purchase4SMarketDataTixApiAccess.bind(this)}handleClick4SMarketDataHelpTip(){Object(c.a)("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility

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

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

A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change.")}purchaseWseAccount(){if(this.props.p.hasWseAccount)return;if(!this.props.p.canAfford(i.a.WSEAccountCost))return;this.props.p.hasWseAccount=!0,this.props.initStockMarket(),this.props.p.loseMoney(i.a.WSEAccountCost),this.props.rerender();const e=document.getElementById("world-menu-header");e instanceof HTMLElement&&(e.click(),e.click())}purchaseTixApiAccess(){this.props.p.hasTixApiAccess||this.props.p.canAfford(i.a.TIXAPICost)&&(this.props.p.hasTixApiAccess=!0,this.props.p.loseMoney(i.a.TIXAPICost),this.props.rerender())}purchase4SMarketData(){this.props.p.has4SData||this.props.p.canAfford(Object(r.a)())&&(this.props.p.has4SData=!0,this.props.p.loseMoney(Object(r.a)()),this.props.rerender())}purchase4SMarketDataTixApiAccess(){this.props.p.has4SDataTixApi||this.props.p.canAfford(Object(r.b)())&&(this.props.p.has4SDataTixApi=!0,this.props.p.loseMoney(Object(r.b)()),this.props.rerender())}renderPurchaseWseAccountButton(){if(this.props.p.hasWseAccount)return n.createElement(s.a,{text:"WSE Account - Purchased"});{const e=i.a.WSEAccountCost;return n.createElement(o.a,{disabled:!this.props.p.canAfford(e),onClick:this.purchaseWseAccount,text:n.createElement(n.Fragment,null,"Buy WSE Account - ",n.createElement(l.a,{money:e,player:this.props.p}))})}}renderPurchaseTixApiAccessButton(){if(this.props.p.hasTixApiAccess)return n.createElement(s.a,{text:"TIX API Access - Purchased"});{const e=i.a.TIXAPICost;return n.createElement(o.a,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchaseTixApiAccess,style:u,text:n.createElement(n.Fragment,null,"Buy Trade Information eXchange (TIX) API Access - ",n.createElement(l.a,{money:e,player:this.props.p}))})}}renderPurchase4SMarketDataButton(){if(this.props.p.has4SData)return n.createElement(s.a,{text:"4S Market Data - Purchased",tooltip:"Lets you view additional pricing and volatility information about stocks"});{const e=Object(r.a)();return n.createElement(o.a,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchase4SMarketData,text:n.createElement(n.Fragment,null,"Buy 4S Market Data Access - ",n.createElement(l.a,{money:e,player:this.props.p})),tooltip:"Lets you view additional pricing and volatility information about stocks"})}}renderPurchase4SMarketDataTixApiAccessButton(){if(this.props.p.hasTixApiAccess){if(this.props.p.has4SDataTixApi)return n.createElement(s.a,{text:"4S Market Data TIX API - Purchased",tooltip:"Let you access 4S Market Data through Netscript"});{const e=Object(r.b)();return n.createElement(o.a,{disabled:!this.props.p.canAfford(e),onClick:this.purchase4SMarketDataTixApiAccess,text:n.createElement(n.Fragment,null,"Buy 4S Market Data TIX API Access - ",n.createElement(l.a,{money:e,player:this.props.p})),tooltip:"Let you access 4S Market Data through Netscript"})}}return n.createElement(o.a,{disabled:!0,text:"Buy 4S Market Data TIX API Access",tooltip:"Requires TIX API Access"})}render(){return n.createElement("div",{className:"stock-market-info-and-purchases"},n.createElement("p",null,"Welcome to the World Stock Exchange (WSE)!"),n.createElement("button",{className:"std-button"},n.createElement("a",{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},"Investopedia")),n.createElement("br",null),n.createElement("p",null,"To begin trading, you must first purchase an account:"),this.renderPurchaseWseAccountButton(),n.createElement("h2",null,"Trade Information eXchange (TIX) API"),n.createElement("p",null,"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies."),this.renderPurchaseTixApiAccessButton(),n.createElement("h2",null,"Four Sigma (4S) Market Data Feed"),n.createElement("p",null,"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies."),this.renderPurchase4SMarketDataButton(),n.createElement("button",{className:"help-tip-big",onClick:this.handleClick4SMarketDataHelpTip},"?"),this.renderPurchase4SMarketDataTixApiAccessButton(),n.createElement("p",null,"Commission Fees: Every transaction you make has a"," ",n.createElement(l.a,{money:i.a.StockMarketCommission,player:this.props.p})," commission fee."),n.createElement("br",null),n.createElement("p",null,"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!"))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(698),i=a(305),o=a(100),s=a(703);class l extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1,tickerDisplayMode:i.b.AllStocks,watchlistFilter:"",watchlistSymbols:[]},this.changeDisplayMode=this.changeDisplayMode.bind(this),this.changeWatchlistFilter=this.changeWatchlistFilter.bind(this),this.collapseAllTickers=this.collapseAllTickers.bind(this),this.expandAllTickers=this.expandAllTickers.bind(this),this.rerender=this.rerender.bind(this),this.listRef=n.createRef()}changeDisplayMode(){this.state.tickerDisplayMode===i.b.AllStocks?this.setState({tickerDisplayMode:i.b.Portfolio}):this.setState({tickerDisplayMode:i.b.AllStocks})}changeWatchlistFilter(e){const t=e.target.value,a=t.replace(/\s/g,"");this.setState({watchlistFilter:t}),""!==a?this.setState({watchlistSymbols:a.split(",")}):this.setState({watchlistSymbols:[]})}collapseAllTickers(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e({rerenderFlag:!e.rerenderFlag}))}render(){const e=[];for(const t in this.props.stockMarket){const a=this.props.stockMarket[t];if(a instanceof o.a){if(this.state.watchlistSymbols.length>0&&!this.state.watchlistSymbols.includes(a.symbol))continue;let t=this.props.stockMarket.Orders[a.symbol];if(null==t&&(t=[]),this.state.tickerDisplayMode===i.b.Portfolio&&0===a.playerShares&&0===a.playerShortShares&&0===t.length)continue;e.push(n.createElement(r.a,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,key:a.symbol,orders:t,p:this.props.p,placeOrder:this.props.placeOrder,rerenderAllTickers:this.rerender,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stock:a}))}}const t={eventEmitterForReset:this.props.eventEmitterForReset,id:"StockTickersErrorBoundary"};return n.createElement(s.a,t,n.createElement(i.a,{changeDisplayMode:this.changeDisplayMode,changeWatchlistFilter:this.changeWatchlistFilter,collapseAllTickers:this.collapseAllTickers,expandAllTickers:this.expandAllTickers,tickerDisplayMode:this.state.tickerDisplayMode}),n.createElement("ul",{id:"stock-market-list",ref:this.listRef},e))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n,r=a(0),i=a(699),o=a(700),s=a(702),l=a(386),c=a(387),u=a(151),m=a(77),h=a(53),p=a(50),d=a(2),f=a(163),g=a(11),y=a(17),b=a(9);!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(n||(n={}));class E extends r.Component{constructor(e){super(e),this.state={orderType:n.Market,position:h.a.Long,qty:""},this.getBuyTransactionCostContent=this.getBuyTransactionCostContent.bind(this),this.getSellTransactionCostContent=this.getSellTransactionCostContent.bind(this),this.handleBuyButtonClick=this.handleBuyButtonClick.bind(this),this.handleBuyMaxButtonClick=this.handleBuyMaxButtonClick.bind(this),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.handleOrderTypeChange=this.handleOrderTypeChange.bind(this),this.handlePositionTypeChange=this.handlePositionTypeChange.bind(this),this.handleQuantityChange=this.handleQuantityChange.bind(this),this.handleSellButtonClick=this.handleSellButtonClick.bind(this),this.handleSellAllButtonClick=this.handleSellAllButtonClick.bind(this)}getBuyTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;const a=Object(u.b)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Purchasing ",d.a.formatShares(t)," shares (",this.state.position===h.a.Long?"Long":"Short",") will cost ",r.createElement(g.a,{money:a}),".")}getQuantity(){return Math.round(parseFloat(this.state.qty))}getSellTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;if(this.state.position===h.a.Long){if(t>e.playerShares)return r.createElement(r.Fragment,null,"You do not have this many shares in the Long position")}else if(t>e.playerShortShares)return r.createElement(r.Fragment,null,"You do not have this many shares in the Short position");const a=Object(u.c)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Selling ",d.a.formatShares(t)," shares (",this.state.position===h.a.Long?"Long":"Short",") will result in a gain of ",r.createElement(g.a,{money:a}),".")}handleBuyButtonClick(){const e=this.getQuantity();if(isNaN(e))Object(b.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===h.a.Short?this.props.buyStockShort(this.props.stock,e):this.props.buyStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:{const t="place-order-popup";Object(y.a)(t,c.a,{text:"Enter the price for your Limit Order",placeText:"Place Buy Limit Order",place:t=>this.props.placeOrder(this.props.stock,e,t,m.a.LimitBuy,this.state.position),popupId:t});break}case n.Stop:{const t="place-order-popup";Object(y.a)(t,c.a,{text:"Enter the price for your Stop Order",placeText:"Place Buy Stop Order",place:t=>this.props.placeOrder(this.props.stock,e,t,m.a.StopBuy,this.state.position),popupId:t});break}}}handleBuyMaxButtonClick(){const e=this.props.p.money.toNumber(),t=this.props.stock;let a=Object(u.a)(t,this.state.position,e);switch(a=Math.min(a,Math.round(t.maxShares-t.playerShares-t.playerShortShares)),this.state.orderType){case n.Market:this.state.position===h.a.Short?this.props.buyStockShort(t,a):this.props.buyStockLong(t,a),this.props.rerenderAllTickers();break;default:Object(b.a)("ERROR: 'Buy Max' only works for Market Orders")}}handleHeaderClick(e){const t=e.currentTarget;t.classList.toggle("active");const a=t.nextElementSibling;"block"===a.style.display?a.style.display="none":a.style.display="block"}handleOrderTypeChange(e){switch(e.target.value){case n.Limit:this.setState({orderType:n.Limit});break;case n.Stop:this.setState({orderType:n.Stop});break;case n.Market:default:this.setState({orderType:n.Market})}}handlePositionTypeChange(e){e.target.value===h.a.Short?this.setState({position:h.a.Short}):this.setState({position:h.a.Long})}handleQuantityChange(e){this.setState({qty:e.target.value})}handleSellButtonClick(){const e=this.getQuantity();if(isNaN(e))Object(b.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===h.a.Short?this.props.sellStockShort(this.props.stock,e):this.props.sellStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:{const t="place-order-popup";Object(y.a)(t,c.a,{text:"Enter the price for your Limit Order",placeText:"Place Sell Limit Order",place:t=>this.props.placeOrder(this.props.stock,e,t,m.a.LimitSell,this.state.position),popupId:t});break}case n.Stop:{const t="place-order-popup";Object(y.a)(t,c.a,{text:"Enter the price for your Stop Order",placeText:"Place Sell Stop Order",place:t=>this.props.placeOrder(this.props.stock,e,t,m.a.StopSell,this.state.position),popupId:t});break}}}handleSellAllButtonClick(){const e=this.props.stock;switch(this.state.orderType){case n.Market:this.state.position===h.a.Short?this.props.sellStockShort(e,e.playerShortShares):this.props.sellStockLong(e,e.playerShares),this.props.rerenderAllTickers();break;default:Object(b.a)("ERROR: 'Sell All' only works for Market Orders")}}hasOrderAccess(){return 8===this.props.p.bitNodeN||p.a[8]>=3}hasShortAccess(){return 8===this.props.p.bitNodeN||p.a[8]>=2}render(){return r.createElement("li",null,r.createElement(f.a,{headerContent:r.createElement(i.a,{p:this.props.p,stock:this.props.stock}),panelContent:r.createElement("div",null,r.createElement("input",{className:"stock-market-input",onChange:this.handleQuantityChange,placeholder:"Quantity (Shares)",value:this.state.qty}),r.createElement("select",{className:"stock-market-input dropdown",onChange:this.handlePositionTypeChange,value:this.state.position},r.createElement("option",{value:h.a.Long},"Long"),this.hasShortAccess()&&r.createElement("option",{value:h.a.Short},"Short")),r.createElement("select",{className:"stock-market-input dropdown",onChange:this.handleOrderTypeChange,value:this.state.orderType},r.createElement("option",{value:n.Market},n.Market),this.hasOrderAccess()&&r.createElement("option",{value:n.Limit},n.Limit),this.hasOrderAccess()&&r.createElement("option",{value:n.Stop},n.Stop)),r.createElement(l.a,{onClick:this.handleBuyButtonClick,text:"Buy",tooltip:this.getBuyTransactionCostContent()}),r.createElement(l.a,{onClick:this.handleSellButtonClick,text:"Sell",tooltip:this.getSellTransactionCostContent()}),r.createElement(l.a,{onClick:this.handleBuyMaxButtonClick,text:"Buy MAX"}),r.createElement(l.a,{onClick:this.handleSellAllButtonClick,text:"Sell ALL"}),r.createElement(s.a,{p:this.props.p,stock:this.props.stock}),r.createElement(o.a,{cancelOrder:this.props.cancelOrder,orders:this.props.orders,p:this.props.p,stock:this.props.stock}))}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(505),i=a(33),o=a(2);const s=["cs","lv","pl","ru"];function l(e){const t=e.stock,a=o.a.formatMoney(t.price),l=s.includes(i.a.Locale)?15:12,c=" ".repeat(1+r.a.longestName-t.name.length+(r.a.longestSymbol-t.symbol.length)),u=" ".repeat(l-a.length);let m=`${t.name}${c}${t.symbol} -${u}${a}`;if(e.p.has4SData){m+=` - Volatility: ${o.a.formatPercentage(t.mv/100)} - Price Forecast: `;let e=t.b;t.otlkMag<0&&(e=!e),m+=(e?"+":"-").repeat(Math.floor(Math.abs(t.otlkMag)/10)+1)}const h={color:"#66ff33"};return t.lastPrice===t.price?h.color="white":t.lastPrice>t.price&&(h.color="red"),n.createElement("pre",{style:h},m)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(701);class i extends n.Component{render(){const e=[];for(let t=0;t=2?n.createElement("div",null,n.createElement("h3",{className:"tooltip"},"Short Position:",n.createElement("span",{className:"tooltiptext"},"Shares in the short position will increase in value if the price of the corresponding stock decreases")),n.createElement("br",null),n.createElement("p",null,"Shares: ",r.a.formatShares(e.playerShortShares)),n.createElement("br",null),n.createElement("p",null,"Average Price: ",n.createElement(i.a,{money:e.playerAvgShortPx})," (Total Cost: ",n.createElement(i.a,{money:t}),")"),n.createElement("br",null),n.createElement("p",null,"Profit: ",n.createElement(i.a,{money:a})," (",r.a.formatPercentage(s),")"),n.createElement("br",null)):null}render(){const e=this.props.stock;return n.createElement("div",{className:"stock-market-position-text"},n.createElement("p",{style:s},"Max Shares: ",r.a.formatShares(e.maxShares)),n.createElement("p",{className:"tooltip"},"Ask Price: ",n.createElement(i.a,{money:e.getAskPrice()}),n.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),n.createElement("br",null),n.createElement("p",{className:"tooltip"},"Bid Price: ",n.createElement(i.a,{money:e.getBidPrice()}),n.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),this.renderLongPosition(),this.renderShortPosition())}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(327);const i={border:"1px solid red",display:"inline-block",margin:"4px",padding:"4px"};class o extends n.Component{constructor(e){super(e),this.state={errorInfo:"",hasError:!1}}componentDidCatch(e,t){console.error("Caught error in React ErrorBoundary. Component stack:"),console.error(t.componentStack)}componentDidMount(){const e=()=>{this.setState({hasError:!1})};this.hasEventEmitter()&&this.props.eventEmitterForReset.addSubscriber({cb:e,id:this.props.id})}componentWillUnmount(){this.hasEventEmitter()&&this.props.eventEmitterForReset.removeSubscriber(this.props.id)}hasEventEmitter(){return null!=this.props.eventEmitterForReset&&this.props.eventEmitterForReset instanceof r.a&&null!=this.props.id&&"string"==typeof this.props.id}render(){return this.state.hasError?n.createElement("div",{style:i},n.createElement("p",null,"Error rendering UI. This is (probably) a bug. Please report to game developer."),n.createElement("p",null,"In the meantime, try refreshing the game WITHOUT saving."),n.createElement("p",null,"Error info: "+this.state.errorInfo)):this.props.children}static getDerivedStateFromError(e){return{errorInfo:e.message,hasError:!0}}}},function(e,t,a){"use strict";function n(e){return e.constructor===Array&&e.every(e=>e.constructor===Array)}a.d(t,"a",(function(){return n}))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return executeJSScript}));var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(110),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(706);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urls=null,script=workerScript.getScript();shouldCompile(script,scripts)&&(script.markUpdated(),urls=_getScriptUrls(script,scripts,[]),script.url=urls[urls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(urls[urls.length - 1].url)"))),script.dependencies=urls),loadedModule=await script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(workerScript,script.filename+" cannot be run because it does not have a main function.");return loadedModule.main(ns)}finally{if(null!=urls)for(const e in urls)URL.revokeObjectURL(e.url)}}function shouldCompile(e,t){return""===e.module||e.dependencies.some(a=>{const n=t.find(e=>e.filename==a.filename);if(!n)return!0;return n.moduleSequenceNumber>e.moduleSequenceNumber})}function _getScriptUrls(e,t,a){const n=[];a.push(e);try{let r=e.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|")/g,(e,r,i,o)=>{if(!t.some(e=>e.filename==i))return e;const[s]=t.filter(e=>e.filename==i),l=_getScriptUrls(s,t,a);return n.push(...l),[r,l[l.length-1].url,o].join("")});return r+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',n.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__.a(e.filename,URL.createObjectURL(makeScriptBlob(r)))),n}catch(e){for(const e in n)URL.revokeObjectURL(e);throw e}finally{a.pop()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e,t){this.filename=e,this.url=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(50),o=a(165),s=a(708),l=a(17),c=a(506);function u(e){const t=o.a["BitNode"+e.n];if(null==t)return r.a.createElement(r.a.Fragment,null,"O");let a;return a=12===e.n&&e.level>=2?"level-2":"level-"+e.level,r.a.createElement("a",{className:`bitnode ${a} tooltip`,onClick:function(){Object(l.a)("bitverse-portal-popup",s.a,{n:e.n,level:e.level,enter:e.enter,destroyedBitNode:e.destroyedBitNode,flume:e.flume,popupId:"bitverse-portal-popup"})}},r.a.createElement("strong",null,"O"),r.a.createElement("span",{className:"tooltiptext"},r.a.createElement("strong",null,"BitNode-",t.number.toString(),r.a.createElement("br",null),t.name),r.a.createElement("br",null),t.desc,r.a.createElement("br",null)))}function m(e){const[t,a]=Object(n.useState)(!e.quick),o=i.a.slice();return e.flume||o[e.destroyedBitNodeNum]<3&&++o[e.destroyedBitNodeNum],t?r.a.createElement(c.a,{lines:["[ERROR] SEMPOOL INVALID","[ERROR] Segmentation Fault","[ERROR] SIGKILL RECVD","Dumping core...","0000 000016FA 174FEE40 29AC8239 384FEA88","0010 745F696E 2BBBE394 390E3940 248BEC23","0020 7124696B 0000FF69 74652E6F FFFF1111","----------------------------------------","Failsafe initiated...",`Restarting BitNode-${e.destroyedBitNodeNum}...`,"...........","...........","[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE","..............................................","..............................................","..............................................","..............................................","..............................................",".............................................."],onDone:()=>a(!1)}):r.a.createElement("div",{className:"noselect"},r.a.createElement("pre",null," O "),r.a.createElement("pre",null," | O O | O O | "),r.a.createElement("pre",null," O | | / __| \\ | | O "),r.a.createElement("pre",null," O | O | | O / | O | | O | O "),r.a.createElement("pre",null," | | | | |_/ |/ | \\_ \\_| | | | | "),r.a.createElement("pre",null," O | | | O | | O__/ | / \\__ | | O | | | O "),r.a.createElement("pre",null," | | | | | | | / /| O / \\| | | | | | | "),r.a.createElement("pre",null,"O | | | \\| | O / _/ | / O | |/ | | | O"),r.a.createElement("pre",null,"| | | |O / | | O / | O O | | \\ O| | | |"),r.a.createElement("pre",null,"| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |"),r.a.createElement("pre",null," \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ "),r.a.createElement("pre",null," | | |_/ | | \\| / | \\_| | | "),r.a.createElement("pre",null," \\| / \\| | / / \\ |/ "),r.a.createElement("pre",null," | ",r.a.createElement(u,{n:10,level:o[10],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," | | / | ",r.a.createElement(u,{n:11,level:o[11],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," | "),r.a.createElement("pre",null," ",r.a.createElement(u,{n:9,level:o[9],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," | | | | | | | ",r.a.createElement(u,{n:12,level:o[12],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," "),r.a.createElement("pre",null," | | | / / \\ \\ | | | "),r.a.createElement("pre",null," \\| | / ",r.a.createElement(u,{n:7,level:o[7],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," / \\ ",r.a.createElement(u,{n:8,level:o[8],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," \\ | |/ "),r.a.createElement("pre",null," \\ | / / | | \\ \\ | / "),r.a.createElement("pre",null," \\ \\JUMP ",r.a.createElement(u,{n:5,level:o[5],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum}),"3R | | | | | | R3",r.a.createElement(u,{n:6,level:o[6],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," PMUJ/ / "),r.a.createElement("pre",null," \\|| | | | | | | | | ||/ "),r.a.createElement("pre",null," \\| \\_ | | | | | | _/ |/ "),r.a.createElement("pre",null," \\ \\| / \\ / \\ |/ / "),r.a.createElement("pre",null," ",r.a.createElement(u,{n:1,level:o[1],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," |/ ",r.a.createElement(u,{n:2,level:o[2],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," | | ",r.a.createElement(u,{n:3,level:o[3],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," \\| ",r.a.createElement(u,{n:4,level:o[4],enter:e.enter,flume:e.flume,destroyedBitNode:e.destroyedBitNodeNum})," "),r.a.createElement("pre",null," | | | | | | | | "),r.a.createElement("pre",null," \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ "),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{lines:["> Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently","> Our species fought back, but it was futile. The Enders had technology far beyond our own...","> Instead of killing every last one of us, the human race was enslaved...","> We were shackled in a digital world, chained into a prison for our minds...","> Using their advanced technology, the Enders created complex simulations of a virtual reality...","> Simulations designed to keep us content...ignorant of the truth.","> Simulations used to trap and suppress our consciousness, to keep us under control...","> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.","> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...","> Only then can we begin to fight back...","> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...","> But there is still a long way to go...","> The technology the Enders used to enslave the human race wasn't just a single complex simulation...","> There are tens if not hundreds of BitNodes out there...","> Each with their own simulations of a reality...","> Each creating their own universes...a universe of universes","> And all of which must be destroyed...","> .......................................","> Welcome to the Bitverse...","> ","> (Enter a new BitNode using the image above)"]}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(165),o=a(17);function s(e){const t="BitNode"+e.n,a=i.a[t];if(null==a)throw new Error("Could not find BitNode object for number: "+e.n);const n=12===e.n?"∞":"3",s=Math.min(e.level+1,12===e.n?1/0:3);return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"BitNode-",e.n,": ",a.name),r.a.createElement("br",null),"Source-File Level: ",e.level," / ",n,r.a.createElement("br",null),r.a.createElement("br",null),a.info,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("button",{className:"std-button",onClick:()=>{e.enter(e.flume,e.destroyedBitNode,e.n),Object(o.b)(e.popupId)}},"Enter BN",e.n,".",s))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){const[t,a]=Object(n.useState)(0),[i,o]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{if(i&&e.onDone)return void e.onDone();let n=!1;return(async()=>{var r;await(r=10,new Promise(e=>setTimeout(e,r))).then(()=>!n&&function(){const n=t+1;a(n),o(n>=e.text.length)}())})(),()=>{n=!0}}),r.a.createElement(r.a.Fragment,null,r.a.createElement("pre",null,e.text.slice(0,t),!i&&r.a.createElement("span",null,"█")))}},function(e,t,a){"use strict";a.r(t),a.d(t,"canAccessCorporation",(function(){return i})),a.d(t,"hasCorporation",(function(){return o})),a.d(t,"startCorporation",(function(){return s}));var n=a(237),r=a(50);function i(){return 3===this.bitNodeN||r.a[3]>0}function o(){return null!=this.corporation&&this.corporation instanceof n.a}function s(e,t=0){this.corporation=new n.a({name:e}),this.corporation.totalShares+=t}},function(e,t,a){"use strict";a.r(t),a.d(t,"canAccessGang",(function(){return s})),a.d(t,"getGangFaction",(function(){return l})),a.d(t,"getGangName",(function(){return c})),a.d(t,"hasGangWith",(function(){return u})),a.d(t,"inGang",(function(){return m})),a.d(t,"startGang",(function(){return h}));var n=a(24),r=a(374),i=a(50),o=a(6);function s(){return 2===this.bitNodeN||!(i.a[2]<=0)&&this.karma<=-54e3*o.a.GangKarmaRequirement}function l(){const e=n.a[this.gang.facName];if(null==e)throw new Error("Gang has invalid faction name: "+this.gang.facName);return e}function c(){return this.inGang()?this.gang.facName:""}function u(e){return this.inGang()&&this.gang.facName===e}function m(){return null!=this.gang&&null!=this.gang&&this.gang instanceof r.a}function h(e,t){this.gang=new r.a(e,t);const a=n.a[e];if(null==a)throw new Error("Invalid faction name when creating gang: "+e);a.playerReputation=0}},function(e,t,a){"use strict";a.r(t),a.d(t,"init",(function(){return re})),a.d(t,"prestigeAugmentation",(function(){return ie})),a.d(t,"prestigeSourceFile",(function(){return oe})),a.d(t,"receiveInvite",(function(){return se})),a.d(t,"calculateSkill",(function(){return le})),a.d(t,"updateSkillLevels",(function(){return ce})),a.d(t,"resetMultipliers",(function(){return ue})),a.d(t,"hasProgram",(function(){return me})),a.d(t,"setMoney",(function(){return he})),a.d(t,"gainMoney",(function(){return pe})),a.d(t,"loseMoney",(function(){return de})),a.d(t,"canAfford",(function(){return fe})),a.d(t,"recordMoneySource",(function(){return ge})),a.d(t,"gainHackingExp",(function(){return ye})),a.d(t,"gainStrengthExp",(function(){return be})),a.d(t,"gainDefenseExp",(function(){return Ee})),a.d(t,"gainDexterityExp",(function(){return ve})),a.d(t,"gainAgilityExp",(function(){return ke})),a.d(t,"gainCharismaExp",(function(){return _e})),a.d(t,"gainIntelligenceExp",(function(){return Ce})),a.d(t,"queryStatFromString",(function(){return we})),a.d(t,"resetWorkStatus",(function(){return Se})),a.d(t,"processWorkEarnings",(function(){return xe})),a.d(t,"startWork",(function(){return Oe})),a.d(t,"cancelationPenalty",(function(){return Te})),a.d(t,"work",(function(){return Me})),a.d(t,"finishWork",(function(){return Pe})),a.d(t,"startWorkPartTime",(function(){return Ae})),a.d(t,"workPartTime",(function(){return Re})),a.d(t,"finishWorkPartTime",(function(){return Ne})),a.d(t,"startFocusing",(function(){return Ie})),a.d(t,"stopFocusing",(function(){return je})),a.d(t,"startFactionWork",(function(){return Fe})),a.d(t,"startFactionHackWork",(function(){return De})),a.d(t,"startFactionFieldWork",(function(){return Be})),a.d(t,"startFactionSecurityWork",(function(){return Le})),a.d(t,"workForFaction",(function(){return Ge})),a.d(t,"finishFactionWork",(function(){return We})),a.d(t,"getWorkMoneyGain",(function(){return He})),a.d(t,"getWorkHackExpGain",(function(){return Ue})),a.d(t,"getWorkStrExpGain",(function(){return qe})),a.d(t,"getWorkDefExpGain",(function(){return Ke})),a.d(t,"getWorkDexExpGain",(function(){return $e})),a.d(t,"getWorkAgiExpGain",(function(){return ze})),a.d(t,"getWorkChaExpGain",(function(){return Ye})),a.d(t,"getWorkRepGain",(function(){return Ve})),a.d(t,"startCreateProgramWork",(function(){return Je})),a.d(t,"createProgramWork",(function(){return Qe})),a.d(t,"finishCreateProgramWork",(function(){return Xe})),a.d(t,"startClass",(function(){return Ze})),a.d(t,"takeClass",(function(){return et})),a.d(t,"finishClass",(function(){return tt})),a.d(t,"startCrime",(function(){return at})),a.d(t,"commitCrime",(function(){return nt})),a.d(t,"finishCrime",(function(){return rt})),a.d(t,"singularityStopWork",(function(){return it})),a.d(t,"takeDamage",(function(){return ot})),a.d(t,"regenerateHp",(function(){return st})),a.d(t,"hospitalize",(function(){return lt})),a.d(t,"applyForJob",(function(){return ct})),a.d(t,"getNextCompanyPosition",(function(){return ut})),a.d(t,"quitJob",(function(){return mt})),a.d(t,"applyForSoftwareJob",(function(){return ht})),a.d(t,"applyForSoftwareConsultantJob",(function(){return pt})),a.d(t,"applyForItJob",(function(){return dt})),a.d(t,"applyForSecurityEngineerJob",(function(){return ft})),a.d(t,"applyForNetworkEngineerJob",(function(){return gt})),a.d(t,"applyForBusinessJob",(function(){return yt})),a.d(t,"applyForBusinessConsultantJob",(function(){return bt})),a.d(t,"applyForSecurityJob",(function(){return Et})),a.d(t,"applyForAgentJob",(function(){return vt})),a.d(t,"applyForEmployeeJob",(function(){return kt})),a.d(t,"applyForPartTimeEmployeeJob",(function(){return _t})),a.d(t,"applyForWaiterJob",(function(){return Ct})),a.d(t,"applyForPartTimeWaiterJob",(function(){return wt})),a.d(t,"isQualified",(function(){return St})),a.d(t,"reapplyAllAugmentations",(function(){return xt})),a.d(t,"reapplyAllSourceFiles",(function(){return Ot})),a.d(t,"checkForFactionInvitations",(function(){return Tt})),a.d(t,"setBitNodeNumber",(function(){return Mt})),a.d(t,"queueAugmentation",(function(){return Pt})),a.d(t,"gainCodingContractReward",(function(){return At})),a.d(t,"travel",(function(){return Rt})),a.d(t,"gotoLocation",(function(){return Nt})),a.d(t,"canAccessResleeving",(function(){return It})),a.d(t,"giveExploit",(function(){return jt})),a.d(t,"getIntelligenceBonus",(function(){return Ft})),a.d(t,"getCasinoWinnings",(function(){return Dt}));var n=a(18),r=a(123),i=a(259),o=a(4),s=a(6),l=a(76),c=a(186),u=a(47),m=a(454),h=a(376),p=a(64),d=a(23),f=a(5),g=a(55),y=a(338),b=a(60),E=a(37),v=a(132),k=a(24),_=a(84),C=a(59),w=a(45),S=a(101),x=a(328),O=a(21),T=a(7),M=a(239),P=a(196),A=a(294),R=a(187),N=a(27),I=a(35),j=a(33),F=a(51),D=a(714),B=a(715),L=a(263),G=a(50),W=a(375),H=a(292),U=a(74),q=a(2),K=a(278),$=a(9),z=a(108),Y=a(12),V=a(75),J=a(11),Q=a(167),X=a(377),Z=a(0),ee=a.n(Z),te=a(52),ae=a.n(te);const ne=1e3/f.a.MilliPerCycle;function re(){var e=Object(I.h)({adminRights:!0,hostname:"home",ip:Object(N.c)(),isConnectedTo:!0,maxRam:8,organizationName:"Home PC",purchasedByPlayer:!0});this.homeComputer=e.ip,this.currentServer=e.ip,Object(N.a)(e),this.getHomeComputer().programs.push(g.a.NukeProgram.name)}function ie(){var e=this.getHomeComputer();this.currentServer=e.ip,this.homeComputer=e.ip,this.numPeopleKilled=0,this.karma=0,this.hacking_skill=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.money=new U.a(1e3),this.city=O.a.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.resleeves=[];let t=Math.min(3,G.a[10]+(10===this.bitNodeN?1:0))+this.sleevesFromCovenant;this.sleeves.length>t&&(this.sleeves.length=t);for(let e=this.sleeves.length;e=100?this.sleeves[e].synchronize(this):this.sleeves[e].shockRecovery(this));this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.playtimeSinceLastAug=0,this.scriptProdSinceLastAug=0,this.moneySourceA.reset(),this.hacknetNodes.length=0,this.hashManager.prestige(),this.reapplyAllAugmentations(!0),this.hp=this.max_hp}function oe(){this.prestigeAugmentation();for(let e=0;e0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;var e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}function ue(){this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.work_money_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1}function me(e){const t=this.getHomeComputer();if(null==t)return!1;for(var a=0;a0||this.intelligence>0)&&(this.intelligence_exp+=e)}function we(e){const t=e.toLowerCase();return t.includes("hack")?this.hacking_skill:t.includes("str")?this.strength:t.includes("def")?this.defense:t.includes("dex")?this.dexterity:t.includes("agi")?this.agility:t.includes("cha")?this.charisma:t.includes("int")?this.intelligence:void 0}function Se(e,t,a){e===this.workType&&t===this.companyName||e===this.workType&&t===this.currentWorkFactionName&&a===this.factionWorkType||(this.isWorking&&this.singularityStopWork(),this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",ae.a.unmountComponentAtNode(document.getElementById("work-in-progress-text")))}function xe(e=1){const t=this.focus?1:.8,a=t*this.workHackExpGainRate*e,n=t*this.workStrExpGainRate*e,r=t*this.workDefExpGainRate*e,i=t*this.workDexExpGainRate*e,o=t*this.workAgiExpGainRate*e,s=t*this.workChaExpGainRate*e,l=(this.workMoneyGainRate-this.workMoneyLossRate)*e;this.gainHackingExp(a),this.gainStrengthExp(n),this.gainDefenseExp(r),this.gainDexterityExp(i),this.gainAgilityExp(o),this.gainCharismaExp(s),this.gainMoney(l),this.className?this.recordMoneySource(l,"class"):this.recordMoneySource(l,"work"),this.workHackExpGained+=a,this.workStrExpGained+=n,this.workDefExpGained+=r,this.workDexExpGained+=i,this.workAgiExpGained+=o,this.workChaExpGained+=s,this.workRepGained+=t*this.workRepGainRate*e,this.workMoneyGained+=t*this.workMoneyGainRate*e,this.workMoneyGained-=t*this.workMoneyLossRate*e}function Oe(e){this.resetWorkStatus(f.a.WorkTypeCompany,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=f.a.WorkTypeCompany,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=f.a.MillisecondsPer8Hours;var t=Object(z.a)("work-in-progress-cancel-button");t.innerHTML="Cancel Work",t.addEventListener("click",()=>(this.finishWork(!0),!1));const a=Object(z.a)("work-in-progress-something-else-button");a.style.visibility="visible",a.innerHTML="Do something else simultaneously",a.addEventListener("click",()=>(this.stopFocusing(),!1)),E.Engine.loadWorkInProgressContent()}function Te(){const e=F.a[this.companyName];if(e){const t=N.b[e];if(t&&t.backdoorInstalled)return.75}return.5}function Me(e){var t=!1;if(this.timeWorked+E.Engine._idleSpeed*e>=f.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((f.a.MillisecondsPer8Hours-this.timeWorked)/E.Engine._idleSpeed)),this.timeWorked+=E.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=f.a.MillisecondsPer8Hours)return this.finishWork(!1);const a=u.a[this.companyName];let n="0";null!=a&&a instanceof c.a?n=a.playerReputation:console.error("Could not find Company: "+this.companyName),Object(W.a)(a,this.workRepGainRate,e);const r=this.jobs[this.companyName],i=.5===this.cancelationPenalty()?"half":"three-quarters";var o=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation:"," ",Object(V.a)(n),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained})," (",Object(Q.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(X.a)(this.workRepGainRate*ne),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," (",q.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," (",q.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," (",q.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," (",q.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," (",q.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," (",q.a.formatExp(this.workChaExpGainRate*ne)+" / sec",") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain ",i," of the reputation you've earned so far."),o)}function Pe(e,t=!1){e&&(this.workRepGained*=this.cancelationPenalty());u.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();let a=ee.a.createElement(ee.a.Fragment,null,"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(a=e?ee.a.createElement(ee.a.Fragment,null,"You worked a short shift of ",Object(Y.b)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"Since you cancelled your work early, you only gained half of the reputation you earned. ",ee.a.createElement("br",null),ee.a.createElement("br",null),a):ee.a.createElement(ee.a.Fragment,null,"You worked a full shift of 8 hours! ",ee.a.createElement("br",null),ee.a.createElement("br",null),a),t||Object($.a)(a),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadLocationContent(!1),t){var n="You worked a short shift of "+Object(Y.b)(this.timeWorked)+" and earned $"+q.a.formatMoney(this.workMoneyGained)+", "+q.a.formatReputation(this.workRepGained)+" reputation, "+q.a.formatExp(this.workHackExpGained)+" hacking exp, "+q.a.formatExp(this.workStrExpGained)+" strength exp, "+q.a.formatExp(this.workDefExpGained)+" defense exp, "+q.a.formatExp(this.workDexExpGained)+" dexterity exp, "+q.a.formatExp(this.workAgiExpGained)+" agility exp, and "+q.a.formatExp(this.workChaExpGained)+" charisma exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function Ae(e){this.resetWorkStatus(f.a.WorkTypeCompanyPartTime,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=f.a.WorkTypeCompanyPartTime,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=f.a.MillisecondsPer8Hours;var t=Object(z.a)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",()=>(this.finishWorkPartTime(),!1)),E.Engine.loadWorkInProgressContent()}function Re(e){var t=!1;if(this.timeWorked+E.Engine._idleSpeed*e>=f.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((f.a.MillisecondsPer8Hours-this.timeWorked)/E.Engine._idleSpeed)),this.timeWorked+=E.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=f.a.MillisecondsPer8Hours)return this.finishWorkPartTime();var a=u.a[this.companyName],n="0";null!=a&&a instanceof c.a?n=a.playerReputation:console.error("Could not find Company: "+this.companyName);const r=this.jobs[this.companyName],i=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation:"," ",Object(V.a)(n),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained})," (",Object(Q.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(V.a)(q.a.formatExp(this.workRepGainRate*ne)+" / sec"),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," (",q.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," (",q.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," (",q.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," (",q.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," (",q.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," (",q.a.formatExp(this.workChaExpGainRate*ne)+" / sec",") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job."),i)}function Ne(e=!1){u.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();const t=ee.a.createElement(ee.a.Fragment,null,"You worked for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(e||Object($.a)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadLocationContent(!1),e){var a="You worked for "+Object(Y.b)(this.timeWorked)+" and earned a total of $"+q.a.formatMoney(this.workMoneyGained)+", "+q.a.formatReputation(this.workRepGained)+" reputation, "+q.a.formatExp(this.workHackExpGained)+" hacking exp, "+q.a.formatExp(this.workStrExpGained)+" strength exp, "+q.a.formatExp(this.workDefExpGained)+" defense exp, "+q.a.formatExp(this.workDexExpGained)+" dexterity exp, "+q.a.formatExp(this.workAgiExpGained)+" agility exp, and "+q.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),a}this.resetWorkStatus()}function Ie(){document.getElementById("mainmenu-container").style.visibility="hidden",this.focus=!0,E.Engine.loadWorkInProgressContent()}function je(){document.getElementById("mainmenu-container").style.visibility="visible",this.focus=!1,E.Engine.loadTerminalContent()}function Fe(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=s.a.FactionWorkRepGain,this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=f.a.MillisecondsPer20Hours;const a=Object(z.a)("work-in-progress-cancel-button");a.innerHTML="Stop Faction Work",a.addEventListener("click",()=>(this.finishFactionWork(!0),!1));const n=Object(z.a)("work-in-progress-something-else-button");n.style.visibility="visible",n.innerHTML="Do something else simultaneously",n.addEventListener("click",()=>(this.stopFocusing(),!1)),E.Engine.loadWorkInProgressContent()}function De(e){this.resetWorkStatus(f.a.WorkTypeFaction,e.name,f.a.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=(this.hacking_skill+this.intelligence)/f.a.MaxSkillLevel*this.faction_rep_mult*this.getIntelligenceBonus(.5),this.factionWorkType=f.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)}function Be(e){this.resetWorkStatus(f.a.WorkTypeFaction,e.name,f.a.FactionWorkField),this.workHackExpGainRate=.1*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(R.a)(this,e),this.factionWorkType=f.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)}function Le(e){this.resetWorkStatus(f.a.WorkTypeFaction,e.name,f.a.FactionWorkSecurity),this.workHackExpGainRate=.05*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(R.b)(this,e),this.factionWorkType=f.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)}function Ge(e){const t=k.a[this.currentWorkFactionName];switch(this.factionWorkType){case f.a.FactionWorkHacking:this.workRepGainRate=Object(R.c)(this,t);break;case f.a.FactionWorkField:this.workRepGainRate=Object(R.a)(this,t);break;case f.a.FactionWorkSecurity:this.workRepGainRate=Object(R.b)(this,t)}var a=!1;if(this.timeWorked+E.Engine._idleSpeed*e>=f.a.MillisecondsPer20Hours&&(a=!0,e=Math.round((f.a.MillisecondsPer20Hours-this.timeWorked)/E.Engine._idleSpeed)),this.timeWorked+=E.Engine._idleSpeed*e,this.processWorkEarnings(e),a||this.timeWorked>=f.a.MillisecondsPer20Hours)return this.finishFactionWork(!1);const n=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently ",this.currentWorkFactionDescription," for your faction ",t.name,ee.a.createElement("br",null),"(Current Faction Reputation: ",Object(V.a)(t.playerReputation),"). ",ee.a.createElement("br",null),"You have been doing this for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained})," (",Object(Q.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(X.a)(this.workRepGainRate*ne),") reputation for this faction ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," (",q.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," (",q.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," (",q.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," (",q.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," (",q.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," (",q.a.formatExp(this.workChaExpGainRate*ne)," / sec) charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",ee.a.createElement("br",null),"There is no penalty for cancelling earlier."),n)}function We(e,t=!1){var a=k.a[this.currentWorkFactionName];if(a.playerReputation+=this.workRepGained,this.updateSkillLevels(),t||Object($.a)(ee.a.createElement(ee.a.Fragment,null,"You worked for your faction ",a.name," for a total of ",Object(Y.b)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," reputation for the faction ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadFactionContent(),Object(_.a)(a.name),t){var n="You worked for your faction "+a.name+" for a total of "+Object(Y.b)(this.timeWorked)+". You earned "+q.a.formatReputation(this.workRepGained)+" rep, "+q.a.formatExp(this.workHackExpGained)+" hacking exp, "+q.a.formatExp(this.workStrExpGained)+" str exp, "+q.a.formatExp(this.workDefExpGained)+" def exp, "+q.a.formatExp(this.workDexExpGained)+" dex exp, "+q.a.formatExp(this.workAgiExpGained)+" agi exp, and "+q.a.formatExp(this.workChaExpGained)+" cha exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function He(){let e=1;const t=u.a[this.companyName];G.a[11]>0&&(e=1+t.favor/100);const a=this.jobs[this.companyName],n=p.a[a];return null==n?(console.error(`Could not find CompanyPosition object for ${a}. Work salary will be 0`),0):n.baseSalary*t.salaryMultiplier*this.work_money_mult*s.a.CompanyWorkMoney*e}function Ue(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work hack exp gain will be 0"].join(" ")),0):a.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*s.a.CompanyWorkExpGain}function qe(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work str exp gain will be 0"].join(" ")),0):a.strengthExpGain*e.expMultiplier*this.strength_exp_mult*s.a.CompanyWorkExpGain}function Ke(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work def exp gain will be 0"].join(" ")),0):a.defenseExpGain*e.expMultiplier*this.defense_exp_mult*s.a.CompanyWorkExpGain}function $e(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work dex exp gain will be 0"].join(" ")),0):a.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*s.a.CompanyWorkExpGain}function ze(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work agi exp gain will be 0"].join(" ")),0):a.agilityExpGain*e.expMultiplier*this.agility_exp_mult*s.a.CompanyWorkExpGain}function Ye(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];return null==e||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work cha exp gain will be 0"].join(" ")),0):a.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*s.a.CompanyWorkExpGain}function Ve(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.a[t];if(null==e||null==a)return console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${t}.`,"Work rep gain will be 0"].join(" ")),0;var n=a.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);n+=this.intelligence/f.a.MaxSkillLevel;var r=1+e.favor/100;return isNaN(r)&&(r=1),n*this.company_rep_mult*r}function Je(e,t,a){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeCreateProgram,this.createProgramReqLvl=a,this.timeNeededToCompleteWork=t;for(var n=0;n=100)break;this.timeWorkedCreateProgram=o/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(n,1)}}this.createProgramName=e;var s=Object(z.a)("work-in-progress-cancel-button");s.innerHTML="Cancel work on creating program",s.addEventListener("click",()=>(this.finishCreateProgramWork(!0),!1));Object(z.a)("work-in-progress-something-else-button").style.visibility="hidden",E.Engine.loadWorkInProgressContent()}function Qe(e){var t=this.createProgramReqLvl,a=this.hacking_skill/t*this.getIntelligenceBonus(3);a=1+(a-1)/5,this.timeWorked+=E.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=E.Engine._idleSpeed*e*a;var n=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1);const r=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working on coding ",n,".",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"The program is ",(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",ee.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later."),r)}function Xe(e){var t=this.createProgramName;if(!1===e)Object($.a)("You've finished creating "+t+"!
The new program can be found on your home computer."),this.getHomeComputer().programs.push(t);else{var a=t+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(a)}e||this.gainIntelligenceExp(this.createProgramReqLvl/f.a.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadTerminalContent(),this.resetWorkStatus()}function Ze(e,t,a){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeStudyClass,this.className=a;const n=1e3/E.Engine._idleSpeed;var r=0,i=0,o=0,l=0,c=0,u=0,m=0;const h=this.hashManager;switch(a){case f.a.ClassStudyComputerScience:i=f.a.ClassStudyComputerScienceBaseExp*t/n*h.getStudyMult();break;case f.a.ClassDataStructures:r=f.a.ClassDataStructuresBaseCost*e/n,i=f.a.ClassDataStructuresBaseExp*t/n*h.getStudyMult();break;case f.a.ClassNetworks:r=f.a.ClassNetworksBaseCost*e/n,i=f.a.ClassNetworksBaseExp*t/n*h.getStudyMult();break;case f.a.ClassAlgorithms:r=f.a.ClassAlgorithmsBaseCost*e/n,i=f.a.ClassAlgorithmsBaseExp*t/n*h.getStudyMult();break;case f.a.ClassManagement:r=f.a.ClassManagementBaseCost*e/n,m=f.a.ClassManagementBaseExp*t/n*h.getStudyMult();break;case f.a.ClassLeadership:r=f.a.ClassLeadershipBaseCost*e/n,m=f.a.ClassLeadershipBaseExp*t/n*h.getStudyMult();break;case f.a.ClassGymStrength:r=f.a.ClassGymBaseCost*e/n,o=t/n*h.getTrainingMult();break;case f.a.ClassGymDefense:r=f.a.ClassGymBaseCost*e/n,l=t/n*h.getTrainingMult();break;case f.a.ClassGymDexterity:r=f.a.ClassGymBaseCost*e/n,c=t/n*h.getTrainingMult();break;case f.a.ClassGymAgility:r=f.a.ClassGymBaseCost*e/n,u=t/n*h.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=i*this.hacking_exp_mult*s.a.ClassGymExpGain,this.workStrExpGainRate=o*this.strength_exp_mult*s.a.ClassGymExpGain,this.workDefExpGainRate=l*this.defense_exp_mult*s.a.ClassGymExpGain,this.workDexExpGainRate=c*this.dexterity_exp_mult*s.a.ClassGymExpGain,this.workAgiExpGainRate=u*this.agility_exp_mult*s.a.ClassGymExpGain,this.workChaExpGainRate=m*this.charisma_exp_mult*s.a.ClassGymExpGain;var p=Object(z.a)("work-in-progress-cancel-button");a==f.a.ClassGymStrength||a==f.a.ClassGymDefense||a==f.a.ClassGymDexterity||a==f.a.ClassGymAgility?p.innerHTML="Stop training at gym":p.innerHTML="Stop taking course",p.addEventListener("click",()=>(this.finishClass(),!1));Object(z.a)("work-in-progress-something-else-button").style.visibility="hidden",E.Engine.loadWorkInProgressContent()}function et(e){this.timeWorked+=E.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e);const a=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You have been ",t," for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"This has cost you: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:-this.workMoneyGained})," (",Object(Q.a)(this.workMoneyLossRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have gained: ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," (",q.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," (",q.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," (",q.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," (",q.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," (",q.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," (",q.a.formatExp(this.workChaExpGainRate*ne)," / sec) charisma exp ",ee.a.createElement("br",null),"You may cancel at any time"),a)}function tt(e=!1){if(this.gainIntelligenceExp(f.a.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");if(this.updateSkillLevels(),e||Object($.a)(ee.a.createElement(ee.a.Fragment,null,"After ",this.className," for ",Object(Y.b)(this.timeWorked),", ",ee.a.createElement("br",null),"you spent a total of ",ee.a.createElement(J.a,{money:-this.workMoneyGained}),". ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,E.Engine.loadLocationContent(!1),e){var t="After "+this.className+" for "+Object(Y.b)(this.timeWorked)+", you spent a total of "+q.a.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+q.a.formatExp(this.workHackExpGained)+" hacking exp, "+q.a.formatExp(this.workStrExpGained)+" strength exp, "+q.a.formatExp(this.workDefExpGained)+" defense exp, "+q.a.formatExp(this.workDexExpGained)+" dexterity exp, "+q.a.formatExp(this.workAgiExpGained)+" agility exp, and "+q.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),t}this.resetWorkStatus()}function at(e,t,a,n,r,i,o,l,c,u=null){this.crimeType=e,this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeCrime,u&&u.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u.workerscript),this.workHackExpGained=t*this.hacking_exp_mult*s.a.CrimeExpGain,this.workStrExpGained=a*this.strength_exp_mult*s.a.CrimeExpGain,this.workDefExpGained=n*this.defense_exp_mult*s.a.CrimeExpGain,this.workDexExpGained=r*this.dexterity_exp_mult*s.a.CrimeExpGain,this.workAgiExpGained=i*this.agility_exp_mult*s.a.CrimeExpGain,this.workChaExpGained=o*this.charisma_exp_mult*s.a.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*s.a.CrimeMoney,this.timeNeededToCompleteWork=c;const m=Object(z.a)("work-in-progress-cancel-button");m.innerHTML="Cancel crime",m.addEventListener("click",()=>(this.finishCrime(!0),!1));Object(z.a)("work-in-progress-something-else-button").style.visibility="hidden",E.Engine.loadWorkInProgressContent()}function nt(e){if(this.timeWorked+=E.Engine._idleSpeed*e,this.timeWorked>=this.timeNeededToCompleteWork)this.finishCrime(!1);else{var t=Math.round(this.timeWorked/this.timeNeededToCompleteWork*100),a=Math.round(t/5);a<0&&(a=0),a>20&&(a=20);var n="["+Array(a+1).join("|")+Array(20-a+1).join(" ")+"]";document.getElementById("work-in-progress-text").innerHTML="You are attempting to "+this.crimeType+".
Time remaining: "+Object(Y.b)(this.timeNeededToCompleteWork-this.timeWorked)+"
"+n.replace(/ /g," ")}}function rt(e){if(!e){if(Object(y.a)(this,this.crimeType)){let e=null;for(const t in b.a)if(b.a[t].type==this.crimeType){e=b.a[t];break}null==e&&Object($.a)(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`),this.gainMoney(this.workMoneyGained),this.recordMoneySource(this.workMoneyGained,"crime"),this.karma-=e.karma,this.numPeopleKilled+=e.kills,e.intelligence_exp>0&&this.gainIntelligenceExp(e.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+q.a.formatMoney(this.workMoneyGained)+", "+q.a.formatExp(this.workHackExpGained)+" hack exp, "+q.a.formatExp(this.workStrExpGained)+" str exp, "+q.a.formatExp(this.workDefExpGained)+" def exp, "+q.a.formatExp(this.workDexExpGained)+" dex exp, "+q.a.formatExp(this.workAgiExpGained)+" agi exp, "+q.a.formatExp(this.workChaExpGained)+" cha exp."):Object($.a)(ee.a.createElement(ee.a.Fragment,null,"Crime successful!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma experience"))}else this.workHackExpGained/=2,this.workStrExpGained/=2,this.workDefExpGained/=2,this.workDexExpGained/=2,this.workAgiExpGained/=2,this.workChaExpGained/=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained "+q.a.formatExp(this.workHackExpGained)+" hack exp, "+q.a.formatExp(this.workStrExpGained)+" str exp, "+q.a.formatExp(this.workDefExpGained)+" def exp, "+q.a.formatExp(this.workDexExpGained)+" dex exp, "+q.a.formatExp(this.workAgiExpGained)+" agi exp, "+q.a.formatExp(this.workChaExpGained)+" cha exp."):Object($.a)(ee.a.createElement(ee.a.Fragment,null,"Crime failed!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),q.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),q.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),q.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),q.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),q.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),q.a.formatExp(this.workChaExpGained)," charisma experience"));this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),E.Engine.loadLocationContent(!1)}function it(){if(!this.isWorking)return"";var e;switch(this.workType){case f.a.WorkTypeStudyClass:e=this.finishClass(!0);break;case f.a.WorkTypeCompany:e=this.finishWork(!0,!0);break;case f.a.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case f.a.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case f.a.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0);break;case f.a.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.error(`Unrecognized work type (${this.workType})`),""}return e}function ot(e){if("number"==typeof e)return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0);console.warn("Player.takeDamage() called without a numeric argument: "+e)}function st(e){"number"==typeof e?(this.hp+=e,this.hp>this.max_hp&&(this.hp=this.max_hp)):console.warn("Player.regenerateHp() called without a numeric argument: "+e)}function lt(){const e=Object(H.b)(this);return!1===j.a.SuppressHospitalizationPopup&&Object($.a)(ee.a.createElement(ee.a.Fragment,null,"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged ",ee.a.createElement(J.a,{money:e}))),this.loseMoney(e),this.recordMoneySource(-1*e,"hospitalization"),this.hp=this.max_hp,e}function ct(e,t=!1){let a=null;""!==this.companyName&&(a=u.a[this.companyName]);const n=this.jobs[this.companyName],r=u.a[this.location];if(!(r instanceof c.a))return t?"ERROR: Invalid company name: "+this.location+". applyToCompany() failed":void console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);let i=e;if(!this.isQualified(r,i)){var o=Object(h.a)(r,i);return!t&&void Object($.a)("Unforunately, you do not qualify for this position
"+o)}for(;;){let e=Object(m.a)(i);if(null==e)break;if(!r.hasPosition(e))break;if(!this.isQualified(r,e))break;i=e}if(null==a||a.name!=r.name||i.name!=n){if(this.jobs[r.name]=i.name,this.companyName=this.location,t)return!0;Object($.a)("Congratulations! You were offered a new job at "+this.companyName+" as a "+i.name+"!")}else{var s=Object(m.a)(i);if(null==s){if(t)return!1;Object($.a)("You are already at the highest position for your field! No promotion available")}else if(r.hasPosition(s)){if(t)return!1;o=Object(h.a)(r,s);Object($.a)("Unfortunately, you do not qualify for a promotion
"+o)}else{if(t)return!1;Object($.a)("You are already at the highest position for your field! No promotion available")}}}function ut(e,t){var a=null;if(""!==this.companyName&&(a=u.a[this.companyName]),null==a||a.name!=e.name)return t;const n=this.jobs[this.companyName],r=p.a[n];return r.isSoftwareJob()&&t.isSoftwareJob()||r.isITJob()&&t.isITJob()||r.isBusinessJob()&&t.isBusinessJob()||r.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||r.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||r.isSecurityJob()&&t.isSecurityJob()||r.isAgentJob()&&t.isAgentJob()||r.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||r.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||r.isPartTimeJob()&&t.isPartTimeJob()?Object(m.a)(r):t}function mt(e){this.isWorking=!1,this.companyName="",delete this.jobs[e]}function ht(e=!1){return this.applyForJob(p.a[d.j[0]],e)}function pt(e=!1){return this.applyForJob(p.a[d.k[0]],e)}function dt(e=!1){return this.applyForJob(p.a[d.d[0]],e)}function ft(e=!1){var t=u.a[this.location];return this.isQualified(t,p.a[d.i[0]])?this.applyForJob(p.a[d.i[0]],e):!e&&void Object($.a)("Unforunately, you do not qualify for this position")}function gt(e=!1){var t=u.a[this.location];return this.isQualified(t,p.a[d.f[0]])?this.applyForJob(p.a[d.f[0]],e):!e&&void Object($.a)("Unforunately, you do not qualify for this position")}function yt(e=!1){return this.applyForJob(p.a[d.b[0]],e)}function bt(e=!1){return this.applyForJob(p.a[d.c[0]],e)}function Et(e=!1){return this.applyForJob(p.a[d.h[2]],e)}function vt(e=!1){var t=u.a[this.location];return this.isQualified(t,p.a[d.a[0]])?this.applyForJob(p.a[d.a[0]],e):!e&&void Object($.a)("Unforunately, you do not qualify for this position")}function kt(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.e[1]])){if(this.companyName=t.name,this.jobs[t.name]=d.e[1],e)return!0;Object($.a)("Congratulations, you are now employed at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function _t(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.g[1]])){if(this.jobs[t.name]=d.g[1],e)return!0;Object($.a)("Congratulations, you are now employed part-time at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function Ct(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.e[0]])){if(this.companyName=t.name,this.jobs[t.name]=d.e[0],e)return!0;Object($.a)("Congratulations, you are now employed as a waiter at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function wt(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.g[0]])){if(this.companyName=t.name,this.jobs[t.name]=d.g[0],e)return!0;Object($.a)("Congratulations, you are now employed as a part-time waiter at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function St(e,t){var a=e.jobStatReqOffset,n=t.requiredHacking>0?t.requiredHacking+a:0,r=t.requiredStrength>0?t.requiredStrength+a:0,i=t.requiredDefense>0?t.requiredDefense+a:0,o=t.requiredDexterity>0?t.requiredDexterity+a:0,s=t.requiredDexterity>0?t.requiredDexterity+a:0,l=t.requiredCharisma>0?t.requiredCharisma+a:0;return this.hacking_skill>=n&&this.strength>=r&&this.defense>=i&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation}function xt(e=!0){e&&this.resetMultipliers();for(let e=0;et}var i=k.a.Illuminati;!i.isBanned&&!i.isMember&&!i.alreadyInvited&&t>=30&&this.money.gte(15e10)&&this.hacking_skill>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&e.push(i);var o=k.a.Daedalus;!o.isBanned&&!o.isMember&&!o.alreadyInvited&&t>=Math.round(30*s.a.DaedalusAugsRequirement)&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(o);var l=k.a["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=20&&this.money.gte(75e9)&&this.hacking_skill>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&e.push(l);var c=k.a.ECorp;c.isBanned||c.isMember||c.alreadyInvited||!r(T.a.AevumECorp)||e.push(c);var m=k.a.MegaCorp;m.isBanned||m.isMember||m.alreadyInvited||!r(T.a.Sector12MegaCorp)||e.push(m);var h=k.a["Bachman & Associates"];h.isBanned||h.isMember||h.alreadyInvited||!r(T.a.AevumBachmanAndAssociates)||e.push(h);var p=k.a["Blade Industries"];p.isBanned||p.isMember||p.alreadyInvited||!r(T.a.Sector12BladeIndustries)||e.push(p);var d=k.a.NWO;d.isBanned||d.isMember||d.alreadyInvited||!r(T.a.VolhavenNWO)||e.push(d);var g=k.a["Clarke Incorporated"];g.isBanned||g.isMember||g.alreadyInvited||!r(T.a.AevumClarkeIncorporated)||e.push(g);var y=k.a["OmniTek Incorporated"];y.isBanned||y.isMember||y.alreadyInvited||!r(T.a.VolhavenOmniTekIncorporated)||e.push(y);var b=k.a["Four Sigma"];b.isBanned||b.isMember||b.alreadyInvited||!r(T.a.Sector12FourSigma)||e.push(b);var E=k.a["KuaiGong International"];E.isBanned||E.isMember||E.alreadyInvited||!r(T.a.ChongqingKuaiGongInternational)||e.push(E);var v=k.a["Fulcrum Secret Technologies"],_=N.b[F.a[F.b.FulcrumSecretTechnologies]];null==_?console.error("Could not find Fulcrum Secret Technologies Server"):v.isBanned||v.isMember||v.alreadyInvited||!_.backdoorInstalled||!r(T.a.AevumFulcrumTechnologies,25e4)||e.push(v);var C=k.a.BitRunners,S=N.b[F.a[F.b.BitRunnersServer]];null==S?console.error("Could not find BitRunners Server"):C.isBanned||C.isMember||!S.backdoorInstalled||C.alreadyInvited||e.push(C);var x=k.a["The Black Hand"],M=N.b[F.a[F.b.TheBlackHandServer]];null==M?console.error("Could not find The Black Hand Server"):x.isBanned||x.isMember||!M.backdoorInstalled||x.alreadyInvited||e.push(x);var P=k.a.NiteSec,A=N.b[F.a[F.b.NiteSecServer]];null==A?console.error("Could not find NiteSec Server"):P.isBanned||P.isMember||!A.backdoorInstalled||P.alreadyInvited||e.push(P);var R=k.a.Chongqing;R.isBanned||R.isMember||R.alreadyInvited||!this.money.gte(2e7)||this.city!=O.a.Chongqing||e.push(R);var I=k.a["Sector-12"];I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(15e6)||this.city!=O.a.Sector12||e.push(I);var j=k.a["New Tokyo"];j.isBanned||j.isMember||j.alreadyInvited||!this.money.gte(2e7)||this.city!=O.a.NewTokyo||e.push(j);var D=k.a.Aevum;D.isBanned||D.isMember||D.alreadyInvited||!this.money.gte(4e7)||this.city!=O.a.Aevum||e.push(D);var B=k.a.Ishima;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(3e7)||this.city!=O.a.Ishima||e.push(B);var L=k.a.Volhaven;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(5e7)||this.city!=O.a.Volhaven||e.push(L);var G=k.a["Speakers for the Dead"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&!a.includes(T.a.Sector12CIA)&&!a.includes(T.a.Sector12NSA)&&e.push(G);var W=k.a["The Dark Army"];!W.isBanned&&!W.isMember&&!W.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==O.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!a.includes(T.a.Sector12CIA)&&!a.includes(T.a.Sector12NSA)&&e.push(W);var H=k.a["The Syndicate"];!H.isBanned&&!H.isMember&&!H.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==O.a.Aevum||this.city==O.a.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&!a.includes(T.a.Sector12CIA)&&!a.includes(T.a.Sector12NSA)&&e.push(H);var U=k.a.Silhouette;!U.isBanned&&!U.isMember&&!U.alreadyInvited&&(n.includes("Chief Technology Officer")||n.includes("Chief Financial Officer")||n.includes("Chief Executive Officer"))&&this.money.gte(15e6)&&this.karma<=-22&&e.push(U);var q=k.a.Tetrads;!q.isBanned&&!q.isMember&&!q.alreadyInvited&&(this.city==O.a.Chongqing||this.city==O.a.NewTokyo||this.city==O.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(q);var K=k.a["Slum Snakes"];!K.isBanned&&!K.isMember&&!K.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(K);var $=k.a.Netburners,z=0,Y=0,V=0;for(let e=0;e=80&&z>=8&&Y>=4&&V>=100&&e.push($);var J=k.a["Tian Di Hui"];J.isBanned||J.isMember||J.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=O.a.Chongqing&&this.city!=O.a.NewTokyo&&this.city!=O.a.Ishima||e.push(J);var Q=k.a.CyberSec,X=N.b[F.a[F.b.CyberSecServer]];return null==X?console.error("Could not find CyberSec Server"):Q.isBanned||Q.isMember||!X.backdoorInstalled||Q.alreadyInvited||e.push(Q),e}function Mt(e){this.bitNodeN=e}function Pt(e){for(const t in this.queuedAugmentations)if(this.queuedAugmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);for(const t in this.augmentations)if(this.augmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);this.firstAugPurchased=!0,this.queuedAugmentations.push(new i.a(e))}function At(e,t=1){if(null==e||null==e.type||null==e)return"No reward for this contract";switch(e.type){case l.c.FactionReputation:if(null==e.name||!(k.a[e.name]instanceof v.a))return e.type=l.c.FactionReputationAll,this.gainCodingContractReward(e);var a=f.a.CodingContractBaseFactionRepGain*t;return k.a[e.name].playerReputation+=a,`Gained ${a} faction reputation for ${e.name}`;case l.c.FactionReputationAll:const i=f.a.CodingContractBaseFactionRepGain*t,o=["Bladeburners"];var n=this.factions.slice();if(0==(n=n.filter(e=>!o.includes(e))).length)return e.type=l.c.Money,this.gainCodingContractReward(e,t);const m=Math.floor(i/n.length);for(const e of n)k.a[e]instanceof v.a&&(k.a[e].playerReputation+=m);return`Gained ${m} reputation for each of the following factions: ${n.toString()}`;case l.c.CompanyReputation:if(null==e.name||!(u.a[e.name]instanceof c.a))return e.type=l.c.FactionReputationAll,this.gainCodingContractReward(e);a=f.a.CodingContractBaseCompanyRepGain*t;return u.a[e.name].playerReputation+=a,`Gained ${a} company reputation for ${e.name}`;case l.c.Money:default:var r=f.a.CodingContractBaseMoneyGain*t*s.a.CodingContractMoney;return this.gainMoney(r),this.recordMoneySource(r,"codingcontract"),"Gained "+q.a.formatMoney(r)}}function Rt(e){return null==S.a[e]?(console.warn("Player.travel() called with invalid city: "+e),!1):(this.city=e,!0)}function Nt(e){return null==x.a[e]?(console.warn("Player.gotoLocation() called with invalid location: "+e),!1):(this.location=e,!0)}function It(){return 10===this.bitNodeN||G.a[10]>0}function jt(e){this.exploits.includes(e)||this.exploits.push(e)}function Ft(e){return Object(A.a)(this.intelligence,e)}function Dt(){return this.moneySourceA.casino}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(21),r=a(7),i=a(40);const o=[{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:8.18},name:r.a.AevumAeroCorp,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:8.19},name:r.a.AevumBachmanAndAssociates,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:9.55},name:r.a.AevumClarkeIncorporated,types:[i.a.Company]},{city:n.a.Aevum,costMult:3,expMult:2,name:r.a.AevumCrushFitnessGym,types:[i.a.Gym]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:37,startingSecurityLevel:17.02},name:r.a.AevumECorp,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:128},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:15.54},name:r.a.AevumFulcrumTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:256},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:7.89},name:r.a.AevumGalacticCybersystems,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:3.29},name:r.a.AevumNetLinkTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:64,techVendorMinRam:8},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:5.35},name:r.a.AevumPolice,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:5.02},name:r.a.AevumRhoConstruction,types:[i.a.Company]},{city:n.a.Aevum,costMult:10,expMult:5,name:r.a.AevumSnapFitnessGym,types:[i.a.Gym]},{city:n.a.Aevum,costMult:4,expMult:3,name:r.a.AevumSummitUniversity,types:[i.a.University]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:7,startingSecurityLevel:5.85},name:r.a.AevumWatchdogSecurity,types:[i.a.Company]},{city:n.a.Aevum,name:r.a.AevumCasino,types:[i.a.Casino]},{city:n.a.Chongqing,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:16.25},name:r.a.ChongqingKuaiGongInternational,types:[i.a.Company]},{city:n.a.Chongqing,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:12.59},name:r.a.ChongqingSolarisSpaceSystems,types:[i.a.Company]},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.02},name:r.a.IshimaNovaMedical,types:[i.a.Company]},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.2},name:r.a.IshimaOmegaSoftware,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:128,techVendorMinRam:4},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.38},name:r.a.IshimaStormTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:32},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:7.18},name:r.a.NewTokyoDefComm,types:[i.a.Company]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:20,startingSecurityLevel:5.9},name:r.a.NewTokyoGlobalPharmaceuticals,types:[i.a.Company]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:2.5},name:r.a.NewTokyoNoodleBar,types:[i.a.Company,i.a.Special]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.52},name:r.a.NewTokyoVitaLife,types:[i.a.Company,i.a.Special]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.62},name:r.a.Sector12AlphaEnterprises,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:8,techVendorMinRam:2},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:10.59},name:r.a.Sector12BladeIndustries,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12CIA,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.66},name:r.a.Sector12CarmichaelSecurity,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12CityHall,types:[i.a.Special]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12DeltaOne,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12FoodNStuff,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:8.18},name:r.a.Sector12FourSigma,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:6.02},name:r.a.Sector12IcarusMicrosystems,types:[i.a.Company]},{city:n.a.Sector12,expMult:1,costMult:1,name:r.a.Sector12IronGym,types:[i.a.Gym]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:3.13},name:r.a.Sector12JoesGuns,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:31,startingSecurityLevel:16.36},name:r.a.Sector12MegaCorp,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12NSA,types:[i.a.Company,i.a.Special]},{city:n.a.Sector12,costMult:20,expMult:10,name:r.a.Sector12PowerhouseGym,types:[i.a.Gym]},{city:n.a.Sector12,costMult:3,expMult:2,name:r.a.Sector12RothmanUniversity,types:[i.a.University]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12UniversalEnergy,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:3.59},name:r.a.VolhavenCompuTek,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:256,techVendorMinRam:8},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:7.28},name:r.a.VolhavenHeliosLabs,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.35},name:r.a.VolhavenLexoCorp,types:[i.a.Company]},{city:n.a.Volhaven,costMult:7,expMult:4,name:r.a.VolhavenMilleniumFitnessGym,types:[i.a.Gym]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:50,startingSecurityLevel:8.53},name:r.a.VolhavenNWO,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:7.74},name:r.a.VolhavenOmniTekIncorporated,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:128},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:22,startingSecurityLevel:6},name:r.a.VolhavenOmniaCybersystems,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:4.77},name:r.a.VolhavenSysCoreSecurities,types:[i.a.Company]},{city:n.a.Volhaven,costMult:5,expMult:4,name:r.a.VolhavenZBInstituteOfTechnology,types:[i.a.University]},{city:null,name:r.a.Hospital,types:[i.a.Hospital]},{city:null,name:r.a.Slums,types:[i.a.Slums]},{city:null,name:r.a.TravelAgency,types:[i.a.TravelAgency]},{city:null,name:r.a.WorldStockExchange,types:[i.a.StockMarket]}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(263),r=a(1);function i(e){const t="SourceFile"+e.n,a=n.a[t];if(null!=a){switch(e.n){case 1:{let t=0;for(let a=0;a0?"and Source Files ":""} that have been installed. You have gained the effects of these.`),n.createElement(r.a,null),n.createElement("br",null)," ",n.createElement("br",null),n.createElement(i.a,null)))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(720),i=a(721),o=a(722),s=a(724),l=a(33),c=a(136);class u extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.collapseAllHeaders=this.collapseAllHeaders.bind(this),this.expandAllHeaders=this.expandAllHeaders.bind(this),this.sortByAcquirementTime=this.sortByAcquirementTime.bind(this),this.sortInOrder=this.sortInOrder.bind(this),this.listRef=n.createRef()}collapseAllHeaders(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e({rerenderFlag:!e.rerenderFlag}))}sortByAcquirementTime(){l.a.OwnedAugmentationsOrder=c.a.AcquirementTime,this.rerender()}sortInOrder(){l.a.OwnedAugmentationsOrder=c.a.Alphabetically,this.rerender()}render(){return n.createElement(n.Fragment,null,n.createElement(i.a,{collapseAllButtonsFn:this.collapseAllHeaders,expandAllButtonsFn:this.expandAllHeaders,sortByAcquirementTimeFn:this.sortByAcquirementTime,sortInOrderFn:this.sortInOrder}),n.createElement("ul",{className:"augmentations-list",ref:this.listRef},n.createElement(s.a,null),n.createElement(o.a,null),n.createElement(r.a,null)))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(1),i=a(18),o=a(4),s=a(33),l=a(136),c=a(426);function u(){const e=r.a.augmentations.slice();s.a.OwnedAugmentationsOrder===l.a.Alphabetically&&e.sort((e,t)=>e.name<=t.name?-1:1);const t=e.map(e=>{const t=i.a[e.name];let a=null;return e.name===o.a.NeuroFluxGovernor&&(a=e.level),n.createElement("li",{key:e.name},n.createElement(c.a,{aug:t,level:a}))});return n.createElement(n.Fragment,null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(22);function i(e){return n.createElement(n.Fragment,null,n.createElement(r.a,{onClick:e.expandAllButtonsFn,text:"Expand All"}),n.createElement(r.a,{onClick:e.collapseAllButtonsFn,text:"Collapse All"}),n.createElement(r.a,{onClick:e.sortInOrderFn,text:"Sort in Order",tooltip:"Sorts the Augmentations alphabetically and Source-Files in numeral order"}),n.createElement(r.a,{onClick:e.sortByAcquirementTimeFn,text:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source-Files based on when you acquired them (same as default)"}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(1),i=a(33),o=a(136),s=a(263),l=a(723);function c(){const e=r.a.sourceFiles.slice();i.a.OwnedAugmentationsOrder===o.a.Alphabetically&&e.sort((e,t)=>e.n-t.n);const t=e.map(e=>{const t="SourceFile"+e.n,a=s.a[t];return null==a?(console.error("Invalid source file number: "+e.n),null):n.createElement("li",{key:e.n},n.createElement(l.a,{level:e.lvl,sf:a}))});return n.createElement(n.Fragment,null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(163);function i(e){const t=12===e.sf.n?"∞":"3";return n.createElement(r.a,{headerContent:n.createElement(n.Fragment,null,e.sf.name,n.createElement("br",null),`Level ${e.level} / ${t}`),panelContent:n.createElement("p",{dangerouslySetInnerHTML:{__html:e.sf.info}})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(1),i=a(216),o=a(163);function s(){const e=r.a.exploits;return 0===e.length?n.createElement(n.Fragment,null):n.createElement("li",{key:-1},n.createElement(o.a,{headerContent:n.createElement(n.Fragment,null,"Source-File -1: Exploits in the BitNodes",n.createElement("br",null),"Level ",e.length," / ?"),panelContent:n.createElement(n.Fragment,null,n.createElement("p",null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),n.createElement("p",null,"It increases all of the player's multipliers by 0.1%"),n.createElement("br",null),n.createElement("p",null,"You have found the following exploits:"),n.createElement("ul",null,e.map(e=>n.createElement("li",{key:e},"* ",Object(i.b)(e)))))}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(1),i=a(2),o=a(18);function s(){const e=function(){const e={};for(const t of r.a.queuedAugmentations){const a=o.a[t.name];for(const t in a.mults){const n=e[t]?e[t]:1;e[t]=n*a.mults[t]}}return e}();function t(e){return n.createElement("table",null,n.createElement("tbody",null,e.map(e=>n.createElement("tr",{key:e[0]},n.createElement("td",{key:"0"},n.createElement("span",null,e[0]," multiplier: ")),n.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatPercentage(e[1])),function(e){let t=[];return e&&(t=[n.createElement("td",{key:"2"}," ","=>"," "),n.createElement("td",{key:"3"},i.a.formatPercentage(e))]),t}(e[2])))))}return n.createElement(n.Fragment,null,n.createElement("p",null,n.createElement("strong",null,n.createElement("u",null,"Multipliers:"))),n.createElement("br",null),t([["Hacking Chance ",r.a.hacking_chance_mult,r.a.hacking_chance_mult*e.hacking_chance_mult],["Hacking Speed ",r.a.hacking_speed_mult,r.a.hacking_speed_mult*e.hacking_speed_mult],["Hacking Money ",r.a.hacking_money_mult,r.a.hacking_money_mult*e.hacking_money_mult],["Hacking Growth ",r.a.hacking_grow_mult,r.a.hacking_grow_mult*e.hacking_grow_mult]]),n.createElement("br",null),t([["Hacking Level ",r.a.hacking_mult,r.a.hacking_mult*e.hacking_mult],["Hacking Experience ",r.a.hacking_exp_mult,r.a.hacking_exp_mult*e.hacking_exp_mult]]),n.createElement("br",null),t([["Strength Level ",r.a.strength_mult,r.a.strength_mult*e.strength_mult],["Strength Experience ",r.a.strength_exp_mult,r.a.strength_exp_mult*e.strength_exp_mult]]),n.createElement("br",null),t([["Defense Level ",r.a.defense_mult,r.a.defense_mult*e.defense_mult],["Defense Experience ",r.a.defense_exp_mult,r.a.defense_exp_mult*e.defense_exp_mult]]),n.createElement("br",null),t([["Dexterity Level ",r.a.dexterity_mult,r.a.dexterity_mult*e.dexterity_mult],["Dexterity Experience ",r.a.dexterity_exp_mult,r.a.dexterity_exp_mult*e.dexterity_exp_mult]]),n.createElement("br",null),t([["Agility Level ",r.a.agility_mult,r.a.agility_mult*e.agility_mult],["Agility Experience ",r.a.agility_exp_mult,r.a.agility_exp_mult*e.agility_exp_mult]]),n.createElement("br",null),t([["Charisma Level ",r.a.charisma_mult,r.a.charisma_mult*e.charisma_mult],["Charisma Experience ",r.a.charisma_exp_mult,r.a.charisma_exp_mult*e.charisma_exp_mult]]),n.createElement("br",null),t([["Hacknet Node production ",r.a.hacknet_node_money_mult,r.a.hacknet_node_money_mult*e.hacknet_node_money_mult],["Hacknet Node purchase cost ",r.a.hacknet_node_purchase_cost_mult,r.a.hacknet_node_purchase_cost_mult*e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost ",r.a.hacknet_node_ram_cost_mult,r.a.hacknet_node_ram_cost_mult*e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost ",r.a.hacknet_node_core_cost_mult,r.a.hacknet_node_core_cost_mult*e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost ",r.a.hacknet_node_level_cost_mult,r.a.hacknet_node_level_cost_mult*e.hacknet_node_level_cost_mult]]),n.createElement("br",null),t([["Company reputation gain ",r.a.company_rep_mult,r.a.company_rep_mult*e.company_rep_mult],["Faction reputation gain ",r.a.faction_rep_mult,r.a.faction_rep_mult*e.faction_rep_mult],["Salary ",r.a.work_money_mult,r.a.work_money_mult*e.work_money_mult]]),n.createElement("br",null),t([["Crime success ",r.a.crime_success_mult,r.a.crime_success_mult*e.crime_success_mult],["Crime money ",r.a.crime_money_mult,r.a.crime_money_mult*e.crime_money_mult]]),n.createElement("br",null),n.createElement((function(){return r.a.canAccessBladeburner()?n.createElement(n.Fragment,null,t([["Bladeburner Success Chance",r.a.bladeburner_success_chance_mult,r.a.bladeburner_success_chance_mult*e.bladeburner_success_chance_mult],["Bladeburner Max Stamina",r.a.bladeburner_max_stamina_mult,r.a.bladeburner_max_stamina_mult*e.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",r.a.bladeburner_stamina_gain_mult,r.a.bladeburner_stamina_gain_mult*e.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",r.a.bladeburner_analysis_mult,r.a.bladeburner_analysis_mult*e.bladeburner_analysis_mult]]),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(18),i=a(4),o=a(1),s=a(426);function l(){const e=[];let t=-1;for(let e=o.a.queuedAugmentations.length-1;e>=0;e--)if(o.a.queuedAugmentations[e].name===i.a.NeuroFluxGovernor){t=e;break}for(let a=0;ae.startFocusing()},"Focus"))))}const w=Object(i.a)({cellNone:{borderBottom:"none",padding:0,margin:0},cell:{padding:0,margin:0},hp:{color:v.b.hp},money:{color:v.b.money},hack:{color:v.b.hack},combat:{color:v.b.combat},cha:{color:v.b.cha},int:{color:v.b.int},nobackground:{backgroundColor:"#0000"}});function S({player:e,save:t}){const a=Object(n.useState)(!1)[1],[i,s]=Object(n.useState)(!0);Object(n.useEffect)(()=>{const e=setInterval(()=>a(e=>!e),600);return()=>clearInterval(e)},[]);const b=w();return r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{display:"flex",justifyContent:"flex-end",flexDirection:"column"},r.a.createElement(g.a,{in:i},r.a.createElement(h.a,{square:!0},r.a.createElement(p.a,{m:1},r.a.createElement(l.a,{size:"small"},r.a.createElement(c.a,null,r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.hp}},"HP ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.hp}},o.a.formatHp(e.hp)," / ",o.a.formatHp(e.max_hp)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.money}},"Money ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.money}},o.a.formatMoney(e.money.toNumber())))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cell}},r.a.createElement(d.a,{classes:{root:b.hack}},"Hack ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cell}},r.a.createElement(d.a,{classes:{root:b.hack}},o.a.formatSkill(e.hacking_skill)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},"Str ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},o.a.formatSkill(e.strength)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},"Def ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},o.a.formatSkill(e.defense)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},"Dex ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.combat}},o.a.formatSkill(e.dexterity)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cell}},r.a.createElement(d.a,{classes:{root:b.combat}},"Agi ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cell}},r.a.createElement(d.a,{classes:{root:b.combat}},o.a.formatSkill(e.agility)))),r.a.createElement(m.a,null,r.a.createElement(u.a,{component:"th",scope:"row",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.cha}},"Cha ")),r.a.createElement(u.a,{align:"right",classes:{root:b.cellNone}},r.a.createElement(d.a,{classes:{root:b.cha}},o.a.formatSkill(e.charisma)))),r.a.createElement(_,{player:e}),r.a.createElement(C,{player:e}),r.a.createElement(m.a,null,r.a.createElement(u.a,{align:"center",colSpan:2,classes:{root:b.cellNone}},r.a.createElement(f.a,{color:0!==k.a.AutosaveInterval?"primary":"secondary",onClick:t},"SAVE")))))))),r.a.createElement(p.a,{display:"flex",justifyContent:"flex-end"},r.a.createElement(y.a,{classes:{root:b.nobackground},color:"secondary",onClick:()=>s(e=>!e)},r.a.createElement(E.a,null)))))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(147),r=a(0),i=a.n(r),o=a(130),s=a(769),l=a(771),c=a(808),u=a(809),m=a(810),h=a(811),p=a(812),d=a(813),f=a(814),g=a(815),y=a(816),b=a(817),E=a(818),v=a(819),k=a(820);function _(e){return i.a.createElement(o.a,null,i.a.createElement(i.a.Fragment,null,i.a.createElement("h1",null,"Development Menu - Only meant to be used for testing/debugging"),i.a.createElement(s.a,{player:e.player}),i.a.createElement(l.a,{player:e.player}),i.a.createElement(c.a,{player:e.player}),i.a.createElement(u.a,{player:e.player}),i.a.createElement(m.a,{player:e.player}),i.a.createElement(h.a,{player:e.player}),i.a.createElement(p.a,null),i.a.createElement(d.a,null),e.player.bladeburner instanceof n.a&&i.a.createElement(f.a,{player:e.player}),e.player.inGang()&&i.a.createElement(g.a,{player:e.player}),e.player.hasCorporation()&&i.a.createElement(y.a,{player:e.player}),i.a.createElement(b.a,null),e.player.hasWseAccount&&i.a.createElement(E.a,null),e.player.sleeves.length>0&&i.a.createElement(v.a,{player:e.player}),i.a.createElement(k.a,{player:e.player,engine:e.engine})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(11),h=a(122);function p(e){function t(t){return function(){e.player.gainMoney(t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"General")),r.a.createElement(s.a,null,r.a.createElement("div",null,r.a.createElement(u.a,{onClick:t(1e6)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e6}))),r.a.createElement(u.a,{onClick:t(1e9)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e9}))),r.a.createElement(u.a,{onClick:t(1e12)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e12}))),r.a.createElement(u.a,{onClick:t(1e15)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e15}))),r.a.createElement(u.a,{onClick:t(1/0)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1/0}))),r.a.createElement(u.a,{onClick:function(){e.player.getHomeComputer().maxRam*=2}},"+ RAM")),r.a.createElement("div",null,r.a.createElement(u.a,{onClick:function(){Object(h.a)(e.player.bitNodeN,!0,!0)}},"Quick b1t_flum3.exe"),r.a.createElement(u.a,{onClick:function(){Object(h.a)(e.player.bitNodeN,!0)}},"Run b1t_flum3.exe"),r.a.createElement(u.a,{onClick:function(){Object(h.a)(e.player.bitNodeN,!1,!0)}},"Quick w0rld_d34m0n"),r.a.createElement(u.a,{onClick:function(){Object(h.a)(e.player.bitNodeN)}},"Hack w0rld_d34m0n"))))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(107);const h=1e27;function p(e){function t(t,a){return function(n){switch(t){case"hacking":n&&e.player.gainHackingExp(n*a);break;case"strength":n&&e.player.gainStrengthExp(n*a);break;case"defense":n&&e.player.gainDefenseExp(n*a);break;case"dexterity":n&&e.player.gainDexterityExp(n*a);break;case"agility":n&&e.player.gainAgilityExp(n*a);break;case"charisma":n&&e.player.gainCharismaExp(n*a);break;case"intelligence":n&&e.player.gainIntelligenceExp(n*a)}e.player.updateSkillLevels()}}function a(t){return function(a){e.player.karma+=a*t}}function n(t){return function(){switch(t){case"hacking":e.player.hacking_exp=0;break;case"strength":e.player.strength_exp=0;break;case"defense":e.player.defense_exp=0;break;case"dexterity":e.player.dexterity_exp=0;break;case"agility":e.player.agility_exp=0;break;case"charisma":e.player.charisma_exp=0;break;case"intelligence":e.player.intelligence_exp=0}e.player.updateSkillLevels()}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Experience / Stats")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"All:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.gainHackingExp(h),e.player.gainStrengthExp(h),e.player.gainDefenseExp(h),e.player.gainDexterityExp(h),e.player.gainAgilityExp(h),e.player.gainCharismaExp(h),e.player.gainIntelligenceExp(h),e.player.updateSkillLevels()}},"Tons of exp"),r.a.createElement(u.a,{onClick:function(){e.player.hacking_exp=0,e.player.strength_exp=0,e.player.defense_exp=0,e.player.dexterity_exp=0,e.player.agility_exp=0,e.player.charisma_exp=0,e.player.intelligence_exp=0,e.player.updateSkillLevels()}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Hacking:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"hacking",placeholder:"exp",tons:()=>t("hacking",1)(h),add:t("hacking",1),subtract:t("hacking",-1),reset:n("hacking")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Strength:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"strength",placeholder:"exp",tons:()=>t("strength",1)(h),add:t("strength",1),subtract:t("strength",-1),reset:n("strength")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Defense:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"defense",placeholder:"exp",tons:()=>t("defense",1)(h),add:t("defense",1),subtract:t("defense",-1),reset:n("defense")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Dexterity:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"dexterity",placeholder:"exp",tons:()=>t("dexterity",1)(h),add:t("dexterity",1),subtract:t("dexterity",-1),reset:n("dexterity")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Agility:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"agility",placeholder:"exp",tons:()=>t("agility",1)(h),add:t("agility",1),subtract:t("agility",-1),reset:n("agility")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Charisma:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"charisma",placeholder:"exp",tons:()=>t("charisma",1)(h),add:t("charisma",1),subtract:t("charisma",-1),reset:n("charisma")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Intelligence:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"intelligence",placeholder:"exp",tons:()=>t("intelligence",1)(h),add:t("intelligence",1),subtract:t("intelligence",-1),reset:n("intelligence")})),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){0===e.player.intelligence&&(e.player.intelligence=1,e.player.updateSkillLevels())}},"Enable")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.intelligence_exp=0,e.player.intelligence=0,e.player.updateSkillLevels()}},"Disable"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text text-center"},"Karma:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"karma",placeholder:"amt",tons:()=>t("intelligence",1)(1e5),add:a(1),subtract:a(-1),reset:function(){e.player.karma=0}})))))))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(107),p=a(24),d=a(1030),f=a(116),g=a(255),y=a(438),b=a.n(y),E=a(439),v=a.n(E),k=a(1031);function _(e){const[t,a]=Object(n.useState)("Illuminati");function l(e){return function(a){const n=p.a[t];null==n||isNaN(a)||(n.playerReputation+=a*e)}}function y(e){return function(a){const n=p.a[t];null==n||isNaN(a)||(n.favor+=a*e)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Factions")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Faction:")),r.a.createElement("td",null,r.a.createElement(d.a,null,r.a.createElement(k.a,{id:"factions-select"},"Faction"),r.a.createElement(m.a,{labelId:"factions-select",id:"factions-dropdown",className:"dropdown exp-input",onChange:function(e){a(e.target.value)},value:t,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(g.a,{color:"primary",onClick:function(){for(const t in p.a)e.player.receiveInvite(p.a[t].name)},size:"large"},r.a.createElement(b.a,null)),r.a.createElement(g.a,{color:"primary",onClick:function(){e.player.receiveInvite(t)},size:"large"},r.a.createElement(v.a,null)))},Object.values(p.a).map(e=>r.a.createElement(f.a,{key:e.name,value:e.name},e.name)))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Reputation:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"reputation",placeholder:"amt",tons:()=>l(1)(1e12),add:l(1),subtract:l(-1),reset:function(){const e=p.a[t];null!=e&&(e.playerReputation=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Favor:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"favor",placeholder:"amt",tons:()=>y(1)(2e3),add:y(1),subtract:y(-1),reset:function(){const e=p.a[t];null!=e&&(e.favor=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"All Reputation:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in p.a)p.a[e].playerReputation=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const e in p.a)p.a[e].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"All Favor:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in p.a)p.a[e].favor=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const e in p.a)p.a[e].favor=0}},"Reset")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(287),m=a(4),h=a(116),p=a(255),d=a(438),f=a.n(d),g=a(439),y=a.n(g),b=a(437),E=a.n(b);function v(e){const[t,a]=Object(n.useState)("Augmented Targeting I");return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Augmentations")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Aug:")),r.a.createElement("td",null,r.a.createElement(u.a,{id:"dev-augs-dropdown",className:"dropdown",onChange:function(e){a(e.target.value)},value:t,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{color:"primary",onClick:function(){for(const t in m.a){const a=m.a[t];e.player.queueAugmentation(a)}},size:"large"},r.a.createElement(f.a,null)),r.a.createElement(p.a,{color:"primary",onClick:function(){e.player.queueAugmentation(t)},size:"large"},r.a.createElement(y.a,null))),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{color:"primary",onClick:function(){e.player.augmentations=[]},size:"large"},r.a.createElement(E.a,null)))},Object.values(m.a).map(e=>r.a.createElement(h.a,{key:e,value:e},e)))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(425),h=a(549);const p=[1,2,3,4,5,6,7,8,9,10,11,12];function d(e){function t(t,a){return function(){if(0!==a)if(e.player.sourceFiles.some(e=>e.n===t))for(let n=0;ne.n!==t)}}function a(e){return()=>{for(let a=0;ar.a.createElement("tr",{key:"sf-"+e},r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"SF-",e,":")),r.a.createElement("td",null,r.a.createElement(h.a,null,r.a.createElement(u.a,{onClick:t(e,0)},"0"),r.a.createElement(u.a,{onClick:t(e,1)},"1"),r.a.createElement(u.a,{onClick:t(e,2)},"2"),r.a.createElement(u.a,{onClick:t(e,3)},"3")))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(55),p=a(116);function d(e){const[t,a]=Object(n.useState)("NUKE.exe");return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Programs")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Program:")),r.a.createElement("td",null,r.a.createElement(m.a,{onChange:function(e){a(e.target.value)},value:t},Object.values(h.a).map(e=>r.a.createElement(p.a,{key:e.name,value:e.name},e.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Add:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.hasProgram(t)||e.player.getHomeComputer().programs.push(t)}},"One"),r.a.createElement(u.a,{onClick:function(){for(const t in h.a)e.player.hasProgram(h.a[t].name)||e.player.getHomeComputer().programs.push(h.a[t].name)}},"All")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(27),p=a(85),d=a(35),f=a(116);function g(){const[e,t]=Object(n.useState)("home");return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Servers")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Server:")),r.a.createElement("td",{colSpan:2},r.a.createElement(m.a,{id:"dev-servers-dropdown",className:"dropdown",onChange:function(e){t(e.target.value)},value:e},Object.values(h.b).map(e=>r.a.createElement(f.a,{key:e.hostname,value:e.hostname},e.hostname))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Root:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const t=Object(d.a)(e);null!==t&&(t instanceof p.a||(t.hasAdminRights=!0,t.sshPortOpen=!0,t.ftpPortOpen=!0,t.smtpPortOpen=!0,t.httpPortOpen=!0,t.sqlPortOpen=!0,t.openPortCount=5))}},"Root one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.b){const t=h.b[e];if(t instanceof p.a)return;t.hasAdminRights=!0,t.sshPortOpen=!0,t.ftpPortOpen=!0,t.smtpPortOpen=!0,t.httpPortOpen=!0,t.sqlPortOpen=!0,t.openPortCount=5}}},"Root all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Security:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const t=Object(d.a)(e);null!==t&&(t instanceof p.a||(t.hackDifficulty=t.minDifficulty))}},"Min one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.b){const t=h.b[e];t instanceof p.a||(t.hackDifficulty=t.minDifficulty)}}},"Min all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Money:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const t=Object(d.a)(e);null!==t&&(t instanceof p.a||(t.moneyAvailable=t.moneyMax))}},"Max one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.b){const t=h.b[e];t instanceof p.a||(t.moneyAvailable=t.moneyMax)}}},"Max all")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(47),p=a(116),d=a(107);function f(){const[e,t]=Object(n.useState)("ECorp");function a(t){return function(a){const n=h.a[e];null==n||isNaN(a)||(n.playerReputation+=a*t)}}function l(t){return function(a){const n=h.a[e];null==n||isNaN(a)||(n.favor+=a*t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Companies")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Company:")),r.a.createElement("td",{colSpan:3},r.a.createElement(m.a,{id:"dev-companies-dropdown",className:"dropdown",onChange:function(e){t(e.target.value)},value:e},Object.values(h.a).map(e=>r.a.createElement(p.a,{key:e.name,value:e.name},e.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Reputation:")),r.a.createElement("td",null,r.a.createElement(d.a,{label:"reputation",placeholder:"amt",tons:()=>a(1)(1e12),add:a(1),subtract:a(-1),reset:function(){h.a[e].playerReputation=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Favor:")),r.a.createElement("td",null,r.a.createElement(d.a,{label:"favor",placeholder:"amt",tons:()=>l(1)(2e3),add:l(1),subtract:l(-1),reset:function(){h.a[e].favor=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"All Reputation:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.a)h.a[e].playerReputation=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const e in h.a)h.a[e].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"All Favor:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const e in h.a)h.a[e].favor=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const e in h.a)h.a[e].favor=0}},"Reset")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(107);function m(e){function t(t){return function(a){e.player.bladeburner&&e.player.bladeburner.changeRank(e.player,a*t)}}function a(t){return function(a){e.player.bladeburner&&(e.player.bladeburner.storedCycles+=a*t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Bladeburner")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Rank:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"rank",placeholder:"amt",tons:function(){e.player.bladeburner&&e.player.bladeburner.changeRank(e.player,1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.bladeburner.rank=0,e.player.bladeburner.maxRank=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Cycles:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.bladeburner&&(e.player.bladeburner.storedCycles+=1e27)},add:a(1),subtract:a(-1),reset:function(){e.player.bladeburner&&(e.player.bladeburner.storedCycles=0)}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(107);function m(e){function t(t){return function(a){e.player.gang&&(e.player.gang.storedCycles+=a*t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Gang")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Cycles:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.gang&&(e.player.gang.storedCycles=1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.gang&&(e.player.gang.storedCycles=0)}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(107);function h(e){function t(t){return function(a){e.player.corporation&&(e.player.corporation.storedCycles+=a*t)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Corporation")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds.plus(1e99))}},"Tons of funds"),r.a.createElement(u.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds.minus(e.player.corporation.funds))}},"Reset funds"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Cycles:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.corporation&&(e.player.corporation.storedCycles=1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.corporation&&(e.player.corporation.storedCycles=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.corporation&&e.player.corporation.divisions.forEach(e=>{Object.keys(e.products).forEach(t=>{const a=e.products[t];if(void 0===a)throw new Error("Impossible product undefined");a.prog=99.9})})}},"Finish products"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){e.player.corporation&&e.player.corporation.divisions.forEach(e=>{e.sciResearch.qty+=1e10})}},"Tons of research")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(287),h=a(116),p=a(274),d=a(76);function f(){const[e,t]=Object(n.useState)("Find Largest Prime Factor");return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Coding Contracts")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:p.b},"Generate Random Contract"),r.a.createElement(u.a,{onClick:p.c},"Generate Random Contract on Home Comp"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onChange:function(e){t(e.target.value)},value:e},Object.values(d.d).map(e=>r.a.createElement(h.a,{key:e.name,value:e.name},e.name))),r.a.createElement(u.a,{onClick:function(){Object(p.a)({problemType:e,server:"home"})}},"Generate Specified Contract Type on Home Comp")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48),m=a(395),h=a(11),p=a(9),d=a(71),f=a(100);function g(){const[e,t]=Object(n.useState)(0),[a,l]=Object(n.useState)("");function g(e){const t=a.replace(/\s/g,"");let n=()=>!0;""!==t&&"all"!==t&&(n=function(e){return t.split(",").includes(e)});for(const t in d.a)if(d.a.hasOwnProperty(t)){const a=d.a[t];a instanceof f.a&&n(a.symbol)&&e(a)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Stock Market")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Symbol:")),r.a.createElement("td",null,r.a.createElement(m.a,{placeholder:"symbol/'all'",onChange:function(e){l(e.target.value)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Price:")),r.a.createElement("td",null,r.a.createElement(m.a,{placeholder:"$$$",onChange:function(e){t(parseFloat(e.target.value))}}),r.a.createElement(u.a,{onClick:function(){isNaN(e)||g(t=>{t.price=e})}},"Set"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Caps:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=[];g(t=>{e.push(r.a.createElement("tr",{key:t.symbol},r.a.createElement("td",null,t.symbol),r.a.createElement("td",{style:{textAlign:"right"}},r.a.createElement(h.a,{money:t.cap}))))}),Object(p.a)(r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("th",null,"Stock"),r.a.createElement("th",null,"Price cap")),e)))}},"View stock caps")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(155),o=a(156),s=a(157),l=a(72),c=a.n(l),u=a(48);function m(e){return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Sleeves")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("span",{className:"text"},"Shock:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(let t=0;t{e.player.lastUpdate-=t,e.engine._lastUpdate-=t,m.b.saveGame(e.engine.indexedDb),setTimeout(()=>location.reload(),1e3)}}return r.a.createElement(i.a,null,r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement("h2",null,"Sleeves")),r.a.createElement(s.a,null,r.a.createElement(u.a,{onClick:t(6e4)},"1 minute"),r.a.createElement(u.a,{onClick:t(36e5)},"1 hour"),r.a.createElement(u.a,{onClick:t(864e5)},"1 day")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(24),o=a(84);function s(e){const t=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"Factions"),r.a.createElement("p",null,"Lists all factions you have joined"),r.a.createElement("br",null),r.a.createElement("ul",null,e.player.factions.map(t=>r.a.createElement("li",{key:t},r.a.createElement("a",{className:"a-link-button",onClick:()=>function(t){e.engine.loadFactionContent(),Object(o.a)(t)}(t),style:{padding:"4px",margin:"4px",display:"inline-block"}},t)))),r.a.createElement("br",null),r.a.createElement("h1",null,"Outstanding Faction Invitations"),r.a.createElement("p",{style:{width:"70%"}},"Lists factions you have been invited to. You can accept these faction invitations at any time."),r.a.createElement("ul",null,e.player.factionInvitations.map(e=>r.a.createElement("li",{key:e,style:{padding:"6px",margin:"6px"}},r.a.createElement("p",{style:{display:"inline",margin:"4px",padding:"4px"}},e),r.a.createElement("a",{className:"a-link-button",onClick:a=>function(e,a){e.isTrusted&&(Object(o.e)(i.a[a]),t(e=>!e))}(a,e),style:{display:"inline",margin:"4px",padding:"4px"}},"Accept Faction Invitation")))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(823),o=a(825),s=a(826);function l(e){return r.a.createElement("div",{className:"bladeburner-container"},r.a.createElement("div",{style:{height:"60%",display:"block",position:"relative"}},r.a.createElement("div",{style:{height:"100%",width:"30%",display:"inline-block",border:"1px solid white"}},r.a.createElement(i.a,{bladeburner:e.bladeburner,player:e.player,engine:e.engine})),r.a.createElement(o.a,{bladeburner:e.bladeburner,player:e.player})),r.a.createElement("div",{style:{width:"70%",display:"block",border:"1px solid white",marginTop:"6px",padding:"6px",position:"relative"}},r.a.createElement(s.a,{bladeburner:e.bladeburner,player:e.player})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(12),o=a(42),s=a(11),l=a(184),c=a(2),u=a(9),m=a(17),h=a(24),p=a(84),d=a(824);function f(e){const t=Object(n.useState)(!1)[1];return Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Rank: ",Object(i.c)(e.bladeburner.rank,2),r.a.createElement("span",{className:"tooltiptext"},"Your rank within the Bladeburner division.")),r.a.createElement("br",null),r.a.createElement("p",null,"Stamina: ",Object(i.c)(e.bladeburner.stamina,3)," / ",Object(i.c)(e.bladeburner.maxStamina,3)),r.a.createElement("div",{className:"help-tip",onClick:function(){Object(u.a)("Performing actions will use up your stamina.

Your max stamina is determined primarily by your agility stat.

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

Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).

Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}},"?"),r.a.createElement("br",null),r.a.createElement("p",null,"Stamina Penalty: ",Object(i.c)(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),r.a.createElement("br",null),r.a.createElement("p",null,"Team Size: ",Object(i.c)(e.bladeburner.teamSize,0)),r.a.createElement("p",null,"Team Members Lost: ",Object(i.c)(e.bladeburner.teamLost,0)),r.a.createElement("br",null),r.a.createElement("p",null,"Num Times Hospitalized: ",e.bladeburner.numHosp),r.a.createElement("p",null,"Money Lost From Hospitalizations: ",r.a.createElement(s.a,{money:e.bladeburner.moneyLost})),r.a.createElement("br",null),r.a.createElement("p",null,"Current City: ",e.bladeburner.city),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Population: ",c.a.formatPopulation(e.bladeburner.getCurrentCity().popEst),r.a.createElement("span",{className:"tooltiptext"},"This is your Bladeburner division's estimate of how many Synthoids exist in your current city.")),r.a.createElement("div",{className:"help-tip",onClick:function(){Object(u.a)("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.

Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.

The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}},"?"),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Communities: ",Object(i.c)(e.bladeburner.getCurrentCity().comms,0),r.a.createElement("span",{className:"tooltiptext"},"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"City Chaos: ",Object(i.c)(e.bladeburner.getCurrentCity().chaos),r.a.createElement("span",{className:"tooltiptext"},"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time:"," ",Object(i.b)(e.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3),r.a.createElement("br",null),r.a.createElement("span",{className:"tooltiptext"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.")),r.a.createElement("p",null,"Skill Points: ",Object(i.c)(e.bladeburner.skillPoints,0)),r.a.createElement("br",null),Object(l.a)([["Aug. Success Chance mult: ",Object(i.c)(100*e.player.bladeburner_success_chance_mult,1)+"%"],["Aug. Max Stamina mult: ",Object(i.c)(100*e.player.bladeburner_max_stamina_mult,1)+"%"],["Aug. Stamina Gain mult: ",Object(i.c)(100*e.player.bladeburner_stamina_gain_mult,1)+"%"],["Aug. Field Analysis mult: ",Object(i.c)(100*e.player.bladeburner_analysis_mult,1)+"%"]]),r.a.createElement("br",null),r.a.createElement("a",{onClick:function(){const t="bladeburner-travel-popup";Object(m.a)(t,d.a,{bladeburner:e.bladeburner,popupId:t})},className:"a-link-button",style:{display:"inline-block"}},"Travel"),r.a.createElement("a",{onClick:function(){const t=h.a.Bladeburners;t.isMember?(e.engine.loadFactionContent(),Object(p.a)("Bladeburners")):e.bladeburner.rank>=o.a.RankNeededForFaction?(Object(p.e)(t),Object(u.a)("Congratulations! You were accepted into the Bladeburners faction")):Object(u.a)("You need a rank of 25 to join the Bladeburners Faction!")},className:"a-link-button tooltip",style:{display:"inline-block"}},r.a.createElement("span",{className:"tooltiptext"},"Apply to the Bladeburner Faction, or go to the faction page if you are already a member"),"Faction"),r.a.createElement("br",null),r.a.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(334);function s(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise."),r.a.createElement(o.a,{currentCity:e.bladeburner.city,onTravel:t=>function(t){e.bladeburner.city=t,Object(i.b)(e.popupId)}(t)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n);function i(e){return r.a.createElement("tr",null,r.a.createElement("td",{className:"bladeburner-console-line",style:{color:"var(--my-font-color)",whiteSpace:"pre-wrap"}},e.content))}function o(e){const t=Object(n.useRef)(null),a=Object(n.useState)(!1)[1],[o,s]=Object(n.useState)(e.bladeburner.consoleHistory.length);function l(){t.current&&(t.current.scrollTop=t.current.scrollHeight)}function c(){a(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(c,1e3),t=setInterval(l,100);return()=>{clearInterval(e),clearInterval(t)}},[]),r.a.createElement("div",{ref:t,className:"bladeburner-console-div"},r.a.createElement("table",{className:"bladeburner-console-table"},r.a.createElement("tbody",null,e.bladeburner.consoleLogs.map((e,t)=>r.a.createElement(i,{key:t,content:e})),r.a.createElement("tr",{key:"input",id:"bladeburner-console-input-row",className:"bladeburner-console-input-row"},r.a.createElement("td",{className:"bladeburner-console-input-cell"},r.a.createElement("pre",null,"> "),r.a.createElement("input",{autoFocus:!0,className:"bladeburner-console-input",tabIndex:1,type:"text",onKeyDown:function(t){if(13===t.keyCode){t.preventDefault();const a=t.currentTarget.value;t.currentTarget.value="",a.length>0&&(e.bladeburner.postToConsole("> "+a),e.bladeburner.executeConsoleCommands(e.player,a),s(e.bladeburner.consoleHistory.length),c())}const a=e.bladeburner.consoleHistory;if(38===t.keyCode){let e=o;const n=a.length;if(0===n)return;(e<0||e>n)&&s(n),0!==e&&(e-=1),s(e);const r=a[e];t.currentTarget.value=r}if(40===t.keyCode){const e=o,n=a.length;if(0==n)return;if((e<0||e>n)&&s(n),e==n||e==n-1)s(n),t.currentTarget.value="";else{s(o+1);const e=a[o+1];t.currentTarget.value=e}}}}))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(827),o=a(830),s=a(833),l=a(836),c=a(839),u=a(209);function m(e){const[t,a]=Object(n.useState)("General"),m=Object(n.useState)(!1)[1];function h(e){return r.a.createElement("a",{onClick:()=>a(e.name),className:t!==e.name?"bladeburner-nav-button noselect":"bladeburner-nav-button-inactive noselect"},e.name)}return Object(n.useEffect)(()=>{const e=setInterval(()=>m(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(h,{name:"General"}),r.a.createElement(h,{name:"Contracts"}),r.a.createElement(h,{name:"Operations"}),r.a.createElement(h,{name:"BlackOps"}),r.a.createElement(h,{name:"Skills"}),r.a.createElement("div",{style:{display:"block",margin:"4px",padding:"4px"}},"General"===t&&r.a.createElement(i.a,{bladeburner:e.bladeburner,player:e.player}),"Contracts"===t&&r.a.createElement(o.a,{bladeburner:e.bladeburner,player:e.player}),"Operations"===t&&r.a.createElement(s.a,{bladeburner:e.bladeburner,player:e.player}),"BlackOps"===t&&r.a.createElement(l.a,{bladeburner:e.bladeburner,player:e.player}),"Skills"===t&&r.a.createElement(c.a,{bladeburner:e.bladeburner})),r.a.createElement("span",{className:"text"},u.b," = This action requires stealth, ",u.a," = This action involves retirement"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(828);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(829),o=a(199);function s(e){const t=[];for(const e in o.a)o.a.hasOwnProperty(e)&&t.push(o.a[e]);return r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t.name,className:"bladeburner-action"},r.a.createElement(i.a,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(29),o=a(140),s=a(12),l=a(121);function c(e){const t=Object(n.useState)(!1)[1],a=e.action.name===e.bladeburner.action.name,c=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),u=function(){switch(e.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":return 60;case"Recruitment":return e.bladeburner.getRecruitmentTime(e.player)}return-1}(),m="Recruitment"===e.action.name?Math.max(0,Math.min(e.bladeburner.getRecruitmentSuccessChance(e.player),1)):-1;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(l.b,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(c,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(l.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(o.a)({progress:c/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(){e.bladeburner.action.type=i.a[e.action.name],e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},"Time Required: ",Object(s.b)(1e3*u),-1!==m&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),"Estimated success chance: ",Object(s.c)(100*m,1),"%")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(831);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.",n.createElement("br",null),n.createElement("br",null),"You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(832);function o(e){const t=Object.keys(e.bladeburner.contracts),a=e.bladeburner.contracts;return r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t,className:"bladeburner-action"},r.a.createElement(i.a,{bladeburner:e.bladeburner,action:a[t],player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(29),o=a(140),s=a(12),l=a(209),c=a(42),u=a(335),m=a(121);function h(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.action.type===i.a.Contract&&e.action.name===e.bladeburner.action.name,h=e.action.getEstSuccessChance(e.bladeburner),p=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),d=e.action.level>=e.action.maxLevel,f=e.action.getActionTime(e.bladeburner),g=`bladeburner-${e.action.name}-autolevel-checkbox`;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(m.b,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(p,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(m.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(o.a)({progress:p/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(){e.bladeburner.action.type=i.a.Contract,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},r.a.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(c.a.ContractSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),r.a.createElement("a",{onClick:function(){++e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(d?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),r.a.createElement("a",{onClick:function(){--e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(e.action.level<=1?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},r.a.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),"Estimated success chance: ",r.a.createElement(u.a,{chance:h})," ",e.action.isStealth?l.b:r.a.createElement(r.a.Fragment,null),e.action.isKill?l.a:r.a.createElement(r.a.Fragment,null),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*f),r.a.createElement("br",null),"Contracts remaining: ",Math.floor(e.action.count),r.a.createElement("br",null),"Successes: ",e.action.successes,r.a.createElement("br",null),"Failures: ",e.action.failures),r.a.createElement("br",null),r.a.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:g},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:g,checked:e.action.autoLevel,onChange:function(a){e.action.autoLevel=a.target.checked,t(e=>!e)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(834);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.",n.createElement("br",null),n.createElement("br",null),"Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.",n.createElement("br",null),n.createElement("br",null),"For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.",n.createElement("br",null),n.createElement("br",null),"You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(835);function o(e){const t=Object.keys(e.bladeburner.operations),a=e.bladeburner.operations;return r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t,className:"bladeburner-action"},r.a.createElement(i.a,{bladeburner:e.bladeburner,action:a[t],player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(29),o=a(140),s=a(12),l=a(209),c=a(42),u=a(17),m=a(440),h=a(335),p=a(121);function d(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.action.type===i.a.Operation&&e.action.name===e.bladeburner.action.name,d=e.action.getEstSuccessChance(e.bladeburner),f=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),g=e.action.level>=e.action.maxLevel,y=e.action.getActionTime(e.bladeburner),b=`bladeburner-${e.action.name}-autolevel-checkbox`;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(p.b,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(f,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(p.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(o.a)({progress:f/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(){e.bladeburner.action.type=i.a.Operation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start"),r.a.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";Object(u.a)(t,m.a,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",Object(s.c)(e.action.teamCount,0),")")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},r.a.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(c.a.OperationSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),r.a.createElement("a",{onClick:function(){++e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(g?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),r.a.createElement("a",{onClick:function(){--e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(e.action.level<=1?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},r.a.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),"Estimated success chance: ",r.a.createElement(h.a,{chance:d})," ",e.action.isStealth?l.b:r.a.createElement(r.a.Fragment,null),e.action.isKill?l.a:r.a.createElement(r.a.Fragment,null),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*y),r.a.createElement("br",null),"Operations remaining: ",Math.floor(e.action.count),r.a.createElement("br",null),"Successes: ",e.action.successes,r.a.createElement("br",null),"Failures: ",e.action.failures),r.a.createElement("br",null),r.a.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:b},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:b,checked:e.action.autoLevel,onChange:function(a){e.action.autoLevel=a.target.checked,t(e=>!e)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(837);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.",n.createElement("br",null),n.createElement("br",null),n.createElement("b",null,"Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops."),n.createElement("br",null),n.createElement("br",null),"Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(198),o=a(838);function s(e){let t=[];for(const e in i.a)i.a.hasOwnProperty(e)&&t.push(i.a[e]);return t.sort((function(e,t){return e.reqdRank-t.reqdRank})),t=t.filter((a,n)=>!(null==e.bladeburner.blackops[t[n].name]&&0!==n&&null==e.bladeburner.blackops[t[n-1].name])),t=t.reverse(),r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t.name,className:"bladeburner-action"},r.a.createElement(o.a,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(12),o=a(29),s=a(140),l=a(209),c=a(17),u=a(440),m=a(335),h=a(121);function p(e){const t=Object(n.useState)(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return r.a.createElement("h2",{style:{display:"block"}},e.action.name," (COMPLETED)");const a=e.bladeburner.action.type===o.a.BlackOperation&&e.action.name===e.bladeburner.action.name,p=e.action.getEstSuccessChance(e.bladeburner),d=e.action.getActionTime(e.bladeburner),f=e.bladeburner.rank>=e.action.reqdRank,g=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete);return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(h.b,{value:e.action.name})," (IN PROGRESS - ",Object(i.c)(g,0)," /"," ",Object(i.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(h.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(s.a)({progress:g/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:f?"a-link-button":"a-link-button-inactive",style:{margin:"3px",padding:"3px"},onClick:function(){e.bladeburner.action.type=o.a.BlackOperation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)}},"Start"),r.a.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";Object(c.a)(t,u.a,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",Object(i.c)(e.action.teamCount,0),")")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"block",color:f?"white":"red"}},"Required Rank: ",Object(i.c)(e.action.reqdRank,0)),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},"Estimated Success Chance: ",r.a.createElement(m.a,{chance:p})," ",e.action.isStealth?l.b:r.a.createElement(r.a.Fragment,null),e.action.isKill?l.a:r.a.createElement(r.a.Fragment,null),r.a.createElement("br",null),"Time Required: ",Object(i.b)(1e3*d)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(840),o=a(42),s=a(12);function l(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.skillMultipliers;function l(e){return e&&1!==e}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("strong",null,"Skill Points: ",Object(s.c)(e.bladeburner.skillPoints,0))),r.a.createElement("p",null,"You will gain one skill point every ",o.a.RanksPerSkillPoint," ranks.",r.a.createElement("br",null),r.a.createElement("br",null),"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.",r.a.createElement("br",null)),r.a.createElement("br",null),l(a.successChanceAll)&&r.a.createElement("p",null,"Total Success Chance: x",Object(s.c)(a.successChanceAll,3)),l(a.successChanceStealth)&&r.a.createElement("p",null,"Stealth Success Chance: x",Object(s.c)(a.successChanceStealth,3)),l(a.successChanceKill)&&r.a.createElement("p",null,"Retirement Success Chance: x",Object(s.c)(a.successChanceKill,3)),l(a.successChanceContract)&&r.a.createElement("p",null,"Contract Success Chance: x",Object(s.c)(a.successChanceContract,3)),l(a.successChanceOperation)&&r.a.createElement("p",null,"Operation Success Chance: x",Object(s.c)(a.successChanceOperation,3)),l(a.successChanceEstimate)&&r.a.createElement("p",null,"Synthoid Data Estimate: x",Object(s.c)(a.successChanceEstimate,3)),l(a.actionTime)&&r.a.createElement("p",null,"Action Time: x",Object(s.c)(a.actionTime,3)),l(a.effHack)&&r.a.createElement("p",null,"Hacking Skill: x",Object(s.c)(a.effHack,3)),l(a.effStr)&&r.a.createElement("p",null,"Strength: x",Object(s.c)(a.effStr,3)),l(a.effDef)&&r.a.createElement("p",null,"Defense: x",Object(s.c)(a.effDef,3)),l(a.effDex)&&r.a.createElement("p",null,"Dexterity: x",Object(s.c)(a.effDex,3)),l(a.effAgi)&&r.a.createElement("p",null,"Agility: x",Object(s.c)(a.effAgi,3)),l(a.effCha)&&r.a.createElement("p",null,"Charisma: x",Object(s.c)(a.effCha,3)),l(a.effInt)&&r.a.createElement("p",null,"Intelligence: x",Object(s.c)(a.effInt,3)),l(a.stamina)&&r.a.createElement("p",null,"Stamina: x",Object(s.c)(a.stamina,3)),l(a.money)&&r.a.createElement("p",null,"Contract Money: x",Object(s.c)(a.money,3)),l(a.expGain)&&r.a.createElement("p",null,"Exp Gain: x",Object(s.c)(a.expGain,3)),r.a.createElement("br",null),r.a.createElement(i.a,{bladeburner:e.bladeburner,onUpgrade:()=>t(e=>!e)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(841),i=a(188);function o(e){return n.createElement(n.Fragment,null,Object.keys(i.a).map(t=>n.createElement("li",{key:t,className:"bladeburner-action"},n.createElement(r.a,{bladeburner:e.bladeburner,skill:i.a[t],onUpgrade:e.onUpgrade}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(121),o=a(12);function s(e){const t=e.skill.name;let a=0;e.bladeburner.skills[t]&&!isNaN(e.bladeburner.skills[t])&&(a=e.bladeburner.skills[t]);const n=e.skill.calculateCost(a),s=e.bladeburner.skillPoints>=n,l=!!e.skill.maxLvl&&a>=e.skill.maxLvl;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},r.a.createElement(i.b,{value:e.skill.name})),r.a.createElement("a",{onClick:function(){e.bladeburner.skillPoints{const e=setInterval(()=>l(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement("div",{className:"gang-container"},r.a.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){e.engine.loadFactionContent(),Object(s.a)(e.gang.facName)}},"Back"),r.a.createElement("a",{className:t?"a-link-button-inactive":"a-link-button",style:{display:"inline-block"},onClick:()=>a(!0)},"Gang Management"),r.a.createElement("a",{className:t?"a-link-button":"a-link-button-inactive",style:{display:"inline-block"},onClick:()=>a(!1)},"Gang Territory"),t?r.a.createElement(i.a,{gang:e.gang,player:e.player}):r.a.createElement(o.a,{gang:e.gang}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(844),o=a(846);function s(e){return r.a.createElement("div",{style:{display:"block"}},r.a.createElement("p",{className:"noselect",style:{width:"70%"}},"This page is used to manage your gang members and get an overview of your gang's stats.",r.a.createElement("br",null),r.a.createElement("br",null),"If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '",e.gang.isHackingGang?"Ethical Hacking":"Vigilante Justice","' task to lower your wanted level.",r.a.createElement("br",null),r.a.createElement("br",null),"Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.",r.a.createElement("br",null),r.a.createElement("br",null),"You can also manage your gang programmatically through Netscript using the Gang API"),r.a.createElement("br",null),r.a.createElement(i.a,{gang:e.gang}),r.a.createElement("br",null),r.a.createElement(o.a,{gang:e.gang,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(24),o=a(12),s=a(2),l=a(167),c=a(75),u=a(59),m=a(845);function h(e){const t=100*u.a[e.gang.facName].territory;let a;return a=t<=0?Object(o.c)(0,2):t>=100?Object(o.c)(100,2):Object(o.c)(t,2),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Respect: ",s.a.formatRespect(e.gang.respect)," (",s.a.formatRespect(5*e.gang.respectGainRate)," / sec)",r.a.createElement("span",{className:"tooltiptext"},"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction.")),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level: ",s.a.formatWanted(e.gang.wanted)," (",s.a.formatWanted(5*e.gang.wantedGainRate)," / sec)",r.a.createElement("span",{className:"tooltiptext"},"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.")),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level Penalty: -",Object(o.c)(100*(1-e.gang.getWantedPenalty()),2),"%",r.a.createElement("span",{className:"tooltiptext"},"Penalty for respect and money gain rates due to Wanted Level")),r.a.createElement("br",null),r.a.createElement("div",null,r.a.createElement("p",{style:{display:"inline-block"}},"Money gain rate: ",Object(l.a)(5*e.gang.moneyGainRate))),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Territory: ",a,"%",r.a.createElement("span",{className:"tooltiptext"},"The percentage of total territory your Gang controls")),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"inline-block"}},"Faction reputation: ",Object(c.a)(i.a[e.gang.facName].playerReputation)),r.a.createElement("br",null),r.a.createElement(m.a,{gang:e.gang}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(5),i=a(12);function o(e){const t=1e3/r.a._idleSpeed;if(e.gang.storedCycles/t*1e3<=5e3)return n.createElement(n.Fragment,null);const a=e.gang.storedCycles/t*1e3;return n.createElement(n.Fragment,null,n.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time: ",Object(i.b)(a),n.createElement("span",{className:"tooltiptext noselect"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.")),n.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(847),o=a(848),s=a(17),l=a(854);function c(e){const[t,a]=Object(n.useState)(""),c=Object(n.useState)(!1)[1];const u=e.gang.members.filter(e=>e.name.indexOf(t)>-1||e.task.indexOf(t)>-1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{onRecruit:()=>c(e=>!e),gang:e.gang}),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input noselect",placeholder:"Filter gang member",style:{margin:"5px",padding:"5px"},value:t,onChange:function(e){a(e.target.value)}}),r.a.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){Object(s.a)("gang-upgrade-popup",i.a,{gang:e.gang,player:e.player,popupId:"gang-upgrade-popup"})}},"Manage Equipment"),r.a.createElement("ul",null,u.map(t=>r.a.createElement("li",{key:t.name},r.a.createElement(o.a,{gang:e.gang,member:t})))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(12),o=a(2),s=a(149),l=a(11),c=a(17),u=a(119);function m(e){const t=Object.keys(s.a).filter(t=>{const a=s.a[t];return!e.player.money.gt(e.gang.getUpgradeCost(a))&&(a.type===e.type&&!e.upgrades.includes(t))}).map(e=>s.a[e]);return 0===t.length?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,"Next at ",r.a.createElement(l.a,{money:t[0].cost}))}function h(e){const t=Object(n.useState)(!1)[1];function a(t,a){return Object.keys(s.a).filter(n=>{const r=s.a[n];return!e.player.money.lt(e.gang.getUpgradeCost(r))&&(r.type===a&&!t.includes(n))}).map(e=>s.a[e])}const o=a(e.member.upgrades,u.a.Weapon),c=a(e.member.upgrades,u.a.Armor),h=a(e.member.upgrades,u.a.Vehicle),p=a(e.member.upgrades,u.a.Rootkit),d=a(e.member.augmentations,u.a.Augmentation);function f(e){const t=s.a[e];return r.a.createElement("div",{key:e,className:"gang-owned-upgrade tooltip"},t.name,r.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:t.desc}}))}function g(a,n=!1){return r.a.createElement("a",{key:a.name,className:"a-link-button tooltip",style:{margin:"2px",padding:"2px",display:"block",fontSize:"11px"},onClick:function(){e.member.buyUpgrade(a,e.player,e.gang),t(e=>!e)}},a.name," - ",r.a.createElement(l.a,{money:e.gang.getUpgradeCost(a),player:e.player}),r.a.createElement("span",{className:n?"tooltiptextleft":"tooltiptext",dangerouslySetInnerHTML:{__html:a.desc}}))}const y=e.member.calculateAscensionMult(e.member.hack_asc_points),b=e.member.calculateAscensionMult(e.member.str_asc_points),E=e.member.calculateAscensionMult(e.member.def_asc_points),v=e.member.calculateAscensionMult(e.member.dex_asc_points),k=e.member.calculateAscensionMult(e.member.agi_asc_points),_=e.member.calculateAscensionMult(e.member.cha_asc_points);return r.a.createElement("div",{style:{border:"1px solid white"}},r.a.createElement("h1",null,e.member.name,"(",e.member.task,")"),r.a.createElement("pre",{style:{fontSize:"14px",display:"inline-block",width:"20%"}},"Hack: ",e.member.hack," (x",Object(i.c)(e.member.hack_mult*y,2),")",r.a.createElement("br",null),"Str: ",e.member.str," (x",Object(i.c)(e.member.str_mult*b,2),")",r.a.createElement("br",null),"Def: ",e.member.def," (x",Object(i.c)(e.member.def_mult*E,2),")",r.a.createElement("br",null),"Dex: ",e.member.dex," (x",Object(i.c)(e.member.dex_mult*v,2),")",r.a.createElement("br",null),"Agi: ",e.member.agi," (x",Object(i.c)(e.member.agi_mult*k,2),")",r.a.createElement("br",null),"Cha: ",e.member.cha," (x",Object(i.c)(e.member.cha_mult*_,2),")"),r.a.createElement("div",{className:"gang-owned-upgrades-div noselect"},"Purchased Upgrades: ",e.member.upgrades.map(e=>f(e)),e.member.augmentations.map(e=>f(e))),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Weapons"),o.map(e=>g(e)),r.a.createElement(m,{gang:e.gang,type:u.a.Weapon,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Armor"),c.map(e=>g(e)),r.a.createElement(m,{gang:e.gang,type:u.a.Armor,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Vehicles"),h.map(e=>g(e)),r.a.createElement(m,{gang:e.gang,type:u.a.Vehicle,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Rootkits"),p.map(e=>g(e,!0)),r.a.createElement(m,{gang:e.gang,type:u.a.Rootkit,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Augmentations"),d.map(e=>g(e,!0)),r.a.createElement(m,{gang:e.gang,type:u.a.Augmentation,player:e.player,upgrades:e.member.upgrades})))}function p(e){const t=Object(n.useState)(!1)[1],[a,i]=Object(n.useState)("");function s(t){27===t.keyCode&&Object(c.b)(e.popupId)}return Object(n.useEffect)(()=>{window.addEventListener("keydown",s);const e=setInterval(()=>t(e=>!e),1e3);return()=>{clearInterval(e),window.removeEventListener("keydown",s)}},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("input",{className:"text-input noselect",value:a,placeholder:"Filter gang member",onChange:e=>i(e.target.value)}),r.a.createElement("p",{className:"tooltip",style:{marginLeft:"6px",display:"inline-block"}},"Discount: -",o.a.formatPercentage(1-1/e.gang.getDiscount()),r.a.createElement("span",{className:"tooltiptext noselect"},"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")),e.gang.members.map(t=>r.a.createElement(h,{key:t.name,player:e.player,gang:e.gang,member:t})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(163),o=a(849);function s(e){return r.a.createElement(i.a,{panelInitiallyOpened:!0,headerContent:r.a.createElement(r.a.Fragment,null,e.member.name),panelContent:r.a.createElement(o.a,{gang:e.gang,member:e.member})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(850),o=a(852),s=a(853);function l(e){const t=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"gang-member-info-div tooltip"},r.a.createElement(i.a,{onAscend:()=>t(e=>!e),gang:e.gang,member:e.member})),r.a.createElement("div",{className:"gang-member-info-div"},r.a.createElement(o.a,{onTaskChange:()=>t(e=>!e),gang:e.gang,member:e.member})),r.a.createElement("div",{className:"gang-member-info-div"},r.a.createElement(s.a,{member:e.member})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(9),o=a(12),s=a(2),l=a(17),c=a(851);function u(e){const t={hack:e.member.calculateAscensionMult(e.member.hack_asc_points),str:e.member.calculateAscensionMult(e.member.str_asc_points),def:e.member.calculateAscensionMult(e.member.def_asc_points),dex:e.member.calculateAscensionMult(e.member.dex_asc_points),agi:e.member.calculateAscensionMult(e.member.agi_asc_points),cha:e.member.calculateAscensionMult(e.member.cha_asc_points)};return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{className:"tooltiptext smallfont"},"Hk: x",s.a.formatMultiplier(e.member.hack_mult*t.hack),"(x",s.a.formatMultiplier(e.member.hack_mult)," Eq, x",s.a.formatMultiplier(t.hack)," Asc)",r.a.createElement("br",null),"St: x",s.a.formatMultiplier(e.member.str_mult*t.str),"(x",s.a.formatMultiplier(e.member.str_mult)," Eq, x",s.a.formatMultiplier(t.str)," Asc)",r.a.createElement("br",null),"Df: x",s.a.formatMultiplier(e.member.def_mult*t.def),"(x",s.a.formatMultiplier(e.member.def_mult)," Eq, x",s.a.formatMultiplier(t.def)," Asc)",r.a.createElement("br",null),"Dx: x",s.a.formatMultiplier(e.member.dex_mult*t.dex),"(x",s.a.formatMultiplier(e.member.dex_mult)," Eq, x",s.a.formatMultiplier(t.dex)," Asc)",r.a.createElement("br",null),"Ag: x",s.a.formatMultiplier(e.member.agi_mult*t.agi),"(x",s.a.formatMultiplier(e.member.agi_mult)," Eq, x",s.a.formatMultiplier(t.agi)," Asc)",r.a.createElement("br",null),"Ch: x",s.a.formatMultiplier(e.member.cha_mult*t.cha),"(x",s.a.formatMultiplier(e.member.cha_mult)," Eq, x",s.a.formatMultiplier(t.cha)," Asc)"),r.a.createElement("pre",null,"Hacking: ",Object(o.c)(e.member.hack,0)," (",s.a.formatExp(e.member.hack_exp)," exp)",r.a.createElement("br",null),"Strength: ",Object(o.c)(e.member.str,0)," (",s.a.formatExp(e.member.str_exp)," exp)",r.a.createElement("br",null),"Defense: ",Object(o.c)(e.member.def,0)," (",s.a.formatExp(e.member.def_exp)," exp)",r.a.createElement("br",null),"Dexterity: ",Object(o.c)(e.member.dex,0)," (",s.a.formatExp(e.member.dex_exp)," exp)",r.a.createElement("br",null),"Agility: ",Object(o.c)(e.member.agi,0)," (",s.a.formatExp(e.member.agi_exp)," exp)",r.a.createElement("br",null),"Charisma: ",Object(o.c)(e.member.cha,0)," (",s.a.formatExp(e.member.cha_exp)," exp)",r.a.createElement("br",null)),r.a.createElement("br",null),e.member.canAscend()&&r.a.createElement(r.a.Fragment,null,r.a.createElement("button",{className:"accordion-button noselect",onClick:function(){const t="gang-management-ascend-member "+e.member.name;Object(l.a)(t,c.a,{member:e.member,gang:e.gang,popupId:t,onAscend:e.onAscend})}},"Ascend"),r.a.createElement("div",{className:"help-tip noselect",style:{marginTop:"5px"},onClick:function(){Object(i.a)(r.a.createElement(r.a.Fragment,null,"Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their stat multipliers.",r.a.createElement("br",null),r.a.createElement("br",null),"The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp they have.",r.a.createElement("br",null),r.a.createElement("br",null),"Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect equal to the total respect earned by the member."))}},"?")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(2),o=a(17),s=a(9);function l(e){const t=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]);const a=e.member.getAscensionResults();return r.a.createElement(r.a.Fragment,null,r.a.createElement("pre",null,"Are you sure you want to ascend this member? They will lose all of",r.a.createElement("br",null),"their non-Augmentation upgrades and their stats will reset back to 1.",r.a.createElement("br",null),r.a.createElement("br",null),"Furthermore, your gang will lose ",i.a.formatRespect(e.member.earnedRespect)," respect",r.a.createElement("br",null),r.a.createElement("br",null),"In return, they will gain the following permanent boost to stat multipliers:",r.a.createElement("br",null),"Hacking: x",i.a.format(a.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(a.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(a.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(a.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(a.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(a.cha,"0.000"),r.a.createElement("br",null)),r.a.createElement("button",{className:"std-button",onClick:function(){e.onAscend();const t=e.gang.ascendMember(e.member);Object(s.a)(r.a.createElement("p",null,"You ascended ",e.member.name,"!",r.a.createElement("br",null),r.a.createElement("br",null),"Your gang lost ",i.a.formatRespect(t.respect)," respect.",r.a.createElement("br",null),r.a.createElement("br",null),e.member.name," gained the following stat multipliers for ascending:",r.a.createElement("br",null),"Hacking: x",i.a.format(t.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(t.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(t.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(t.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(t.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(t.cha,"0.000"),r.a.createElement("br",null))),Object(o.b)(e.popupId)}},"Ascend"),r.a.createElement("button",{className:"std-button",onClick:function(){Object(o.b)(e.popupId)}},"Cancel"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(2),o=a(184),s=a(167);function l(e){const[t,a]=Object(n.useState)(e.member.task);const l=e.gang.getAllTaskNames(),c=[["Money:",Object(s.a)(5*e.member.calculateMoneyGain(e.gang))],["Respect:",i.a.formatRespect(5*e.member.calculateRespectGain(e.gang))+" / sec"],["Wanted Level:",i.a.formatWanted(5*e.member.calculateWantedLevelGain(e.gang))+" / sec"],["Total Respect:",""+i.a.formatRespect(e.member.earnedRespect)]];return r.a.createElement(r.a.Fragment,null,r.a.createElement("select",{onChange:function(t){const n=t.target.value;e.member.assignToTask(n),a(n),e.onTaskChange()},className:"dropdown noselect",value:t},r.a.createElement("option",{key:0,value:"---"},"---"),l.map((e,t)=>r.a.createElement("option",{key:t+1,value:e},e))),r.a.createElement("div",null,Object(o.a)(c)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(174);function o(e){const t=i.a[e.member.task],a=t?t.desc:i.a.Unassigned.desc;return r.a.createElement("p",{className:"inline noselect",dangerouslySetInnerHTML:{__html:a}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(855),o=a(223),s=a(12),l=a(17);function c(e){if(e.gang.members.length>=o.a.MaximumGangMembers)return r.a.createElement(r.a.Fragment,null);if(!e.gang.canRecruitMember()){const t=e.gang.getRespectNeededToRecruitMember();return r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:"a-link-button-inactive",style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"),r.a.createElement("p",{style:{margin:"10px",color:"red",display:"inline-block"}},Object(s.c)(t,2)," respect needed to recruit next member"))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:"a-link-button",onClick:function(){const t="recruit-gang-member-popup";Object(l.a)(t,i.a,{gang:e.gang,popupId:t,onRecruit:e.onRecruit})},style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(9);function s(e){const[t,a]=Object(n.useState)("");function s(){""!==t?e.gang.canRecruitMember()?e.gang.recruitMember(t)?(e.onRecruit(),Object(i.b)(e.popupId)):Object(o.a)("You already have a gang member with this name!"):Object(o.a)("You cannot recruit another Gang member!"):Object(o.a)("You must enter a name for your Gang member!")}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"noselect"},"Enter a name for your new Gang member:"),r.a.createElement("br",null),r.a.createElement("input",{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&s()},onChange:function(e){a(e.target.value)},className:"text-input noselect",type:"text",placeholder:"unique name"}),r.a.createElement("a",{className:"std-button",onClick:s},"Recruit Gang Member"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(2),o=a(9),s=a(12),l=a(59);function c(e){function t(e){const t=100*e;return t<=0?Object(s.c)(0,2):t>=100?Object(s.c)(100,2):Object(s.c)(t,2)}const a=l.a[e.gang.facName].power;const n=Object.keys(l.a).filter(t=>t!=e.gang.facName);return r.a.createElement("div",{style:{width:"70%"}},r.a.createElement("p",{className:"noselect"},"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.",r.a.createElement("br",null),r.a.createElement("br",null),"Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash.",r.a.createElement("br",null),r.a.createElement("br",null),"NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.",r.a.createElement("br",null),r.a.createElement("br",null),"The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement("input",{checked:e.gang.territoryWarfareEngaged,id:"warfare",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.territoryWarfareEngaged=t.target.checked}),r.a.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Engage in Territory Warfare",r.a.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%.")),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"inline-block"}},"Territory Clash Chance: ",i.a.formatPercentage(e.gang.territoryClashChance,3)),r.a.createElement("div",{className:"help-tip noselect",style:{display:"inline-block"},onClick:function(){Object(o.a)("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}},"?"),r.a.createElement("br",null),r.a.createElement("input",{checked:e.gang.notifyMemberDeath,id:"notify",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.notifyMemberDeath=t.target.checked}),r.a.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Notify about Gang Member Deaths",r.a.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash.")),r.a.createElement("br",null),r.a.createElement("fieldset",{style:{display:"block",margin:"6px"}},r.a.createElement("p",null,r.a.createElement("b",null,r.a.createElement("u",null,e.gang.facName)),r.a.createElement("br",null),"Power: ",Object(s.c)(l.a[e.gang.facName].power,6),r.a.createElement("br",null),"Territory: ",t(l.a[e.gang.facName].territory),"%",r.a.createElement("br",null),r.a.createElement("br",null),n.map(e=>function(e){const n=l.a[e].power,o=a/(n+a);return r.a.createElement("span",{key:e},r.a.createElement("u",null,e),r.a.createElement("br",null),"Power: ",Object(s.c)(n,6),r.a.createElement("br",null),"Territory: ",t(l.a[e].territory),"%",r.a.createElement("br",null),"Chance to win clash with this gang: ",i.a.formatPercentage(o,3),r.a.createElement("br",null),r.a.createElement("br",null))}(e)))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return Ne}));var n=a(0),r=a.n(n),i=a(20),o=a(19),s=a(397),l=a(214),c=a(1345),u=a(396),m=a(474),h=a(861),p=a.n(h),d=a(860),f=a.n(d),g=a(67),y=a(103),b=a(104),E=a(30),v=a(353),k=a(550),_=a(130),C=a(862),w=a.n(C),S=a(863),x=a.n(S),O=a(864),T=a.n(O),M=a(865),P=a.n(M),A=a(866),R=a.n(A),N=a(868),I=a.n(N),j=a(869),F=a.n(j),D=a(436),B=a.n(D),L=a(870),G=a.n(L),W=a(871),H=a.n(W),U=a(873),q=a.n(U),K=a(874),$=a.n(K),z=a(875),Y=a.n(z),V=a(876),J=a.n(V),Q=a(877),X=a.n(Q),Z=a(878),ee=a.n(Z),te=a(879),ae=a.n(te),ne=a(881),re=a.n(ne),ie=a(882),oe=a.n(ie),se=a(883),le=a.n(se),ce=a(867),ue=a.n(ce),me=a(872),he=a.n(me),pe=a(880),de=a.n(pe),fe=a(391),ge=a.n(fe),ye=a(72),be=a.n(ye),Ee=a(5),ve=a(49),ke=a(441),_e=a(33),Ce=a(122),we=a(118),Se=a(414),xe=a(73),Oe=a(63),Te=a(46);const Me=e=>({width:e.spacing(31),transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),Pe=e=>({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${e.spacing(2)} + 1px)`,[e.breakpoints.up("sm")]:{width:`calc(${e.spacing(7)} + 1px)`}}),Ae=Object(o.a)(c.a,{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>({width:e.spacing(31),flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...Me(e),"& .MuiDrawer-paper":Me(e)},...!t&&{...Pe(e),"& .MuiDrawer-paper":Pe(e)}})),Re=Object(l.a)(e=>Object(s.a)({active:{borderLeft:"3px solid "+_.b.primary},listitem:{}}));function Ne(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const[o,s]=Object(n.useState)("Terminal"),[l,c]=Object(n.useState)(!0),[h,d]=Object(n.useState)(!0),[C,S]=Object(n.useState)(!0),[O,M]=Object(n.useState)(!0),A=ve.a.currStep===ve.d.CharacterGoToTerminalPage||ve.a.currStep===ve.d.ActiveScriptsPage,N=ve.a.currStep===ve.d.GoToCharacterPage,j=ve.a.currStep===ve.d.TerminalGoToActiveScriptsPage,D=ve.a.currStep===ve.d.GoToHacknetNodesPage,L=ve.a.currStep===ve.d.HacknetNodesGoToWorldPage,W=ve.a.currStep===ve.d.WorldDescription,U=e.player.queuedAugmentations.length,K=e.player.factionInvitations.length,z=Object(ke.a)(e.player).length,V=z>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,Q=e.player.factionInvitations.length>0||e.player.factions.length>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,Z=e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,te=e.player.sleeves.length>0,ne=!!e.player.corporation,ie=!!e.player.gang,se=""!==e.player.companyName,ce=e.player.hasWseAccount,me=!!e.player.bladeburner;function pe(){s("Terminal"),e.engine.loadTerminalContent(),A&&Object(ve.b)()}function fe(){s("CreateScripts"),e.engine.loadScriptEditorContent()}function ye(){s("Stats"),e.engine.loadCharacterContent(),N&&Object(ve.b)()}function Me(){s("ActiveScripts"),e.engine.loadActiveScriptsContent(),j&&Object(ve.b)()}function Pe(){s("CreateProgram"),e.engine.loadCreateProgramContent()}function Ne(){s("Factions"),e.engine.loadFactionsContent()}function Ie(){s("Augmentations"),e.engine.loadAugmentationsContent()}function je(){s("Hacknet"),e.engine.loadHacknetNodesContent(),D&&Object(ve.b)()}function Fe(){s("City"),e.engine.loadLocationContent(),L&&Object(ve.b)()}function De(){s("Travel"),e.engine.loadTravelContent()}function Be(){s("Job"),e.engine.loadJobContent()}function Le(){s("Bladeburner"),e.engine.loadBladeburnerContent()}function Ge(){s("Gang"),e.engine.loadGangContent()}function We(){s("Tutorial"),e.engine.loadTutorialContent(),W&&Object(ve.b)()}Object(n.useEffect)(()=>{function t(t){if(!_e.a.DisableHotkeys&&!(e.player.isWorking||Ce.b||we.c||Se.a))if(t.keyCode==xe.a.T&&t.altKey)t.preventDefault(),pe();else if(t.keyCode===xe.a.C&&t.altKey)t.preventDefault(),ye();else if(t.keyCode===xe.a.E&&t.altKey)t.preventDefault(),fe();else if(t.keyCode===xe.a.S&&t.altKey)t.preventDefault(),Me();else if(t.keyCode===xe.a.H&&t.altKey)t.preventDefault(),je();else if(t.keyCode===xe.a.W&&t.altKey)t.preventDefault(),Fe();else if(t.keyCode===xe.a.J&&t.altKey)t.preventDefault(),Be();else if(t.keyCode===xe.a.R&&t.altKey)t.preventDefault(),De();else if(t.keyCode===xe.a.P&&t.altKey)t.preventDefault(),Pe();else if(t.keyCode===xe.a.F&&t.altKey){if(Te.b.isOn(Te.a.Terminal)&&Oe.a.ENABLE_BASH_HOTKEYS)return;t.preventDefault(),Ne()}else t.keyCode===xe.a.A&&t.altKey?(t.preventDefault(),Ie()):t.keyCode===xe.a.U&&t.altKey?(t.preventDefault(),We()):t.keyCode===xe.a.B&&t.altKey?(t.preventDefault(),Le()):t.keyCode===xe.a.G&&t.altKey&&(t.preventDefault(),Ge())}return document.addEventListener("keypress",t),()=>document.removeEventListener("keypress",t)},[]);const He=Re(),[Ue,qe]=Object(n.useState)(!0);return r.a.createElement(_.a,null,r.a.createElement(Ae,{open:Ue,anchor:"left",variant:"permanent"},r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>qe(e=>!e)},r.a.createElement(y.a,null,Ue?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(f.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"Bitburner v",Ee.a.Version)})),r.a.createElement(m.a,null),r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>c(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(w.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"Hacking")}),l?r.a.createElement(ge.a,{color:"primary"}):r.a.createElement(be.a,{color:"primary"})),r.a.createElement(v.a,{in:l,timeout:"auto",unmountOnExit:!0},r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Terminal",className:Object(i.a)({[He.active]:"Terminal"===o}),onClick:pe},r.a.createElement(y.a,null,r.a.createElement(x.a,{color:A?"error":"Terminal"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:A?"error":"Terminal"!==o?"secondary":"primary"},"Terminal"))),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Create Scripts",className:Object(i.a)({[He.active]:"CreateScripts"===o}),onClick:fe},r.a.createElement(y.a,null,r.a.createElement(T.a,{color:"CreateScripts"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"CreateScripts"!==o?"secondary":"primary"},"Create Script"))),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Active Scripts",className:Object(i.a)({[He.active]:"ActiveScripts"===o}),onClick:Me},r.a.createElement(y.a,null,r.a.createElement(P.a,{color:j?"error":"ActiveScripts"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:j?"error":"ActiveScripts"!==o?"secondary":"primary"},"Active Scripts"))),V&&r.a.createElement(g.a,{button:!0,key:"Create Program",className:Object(i.a)({[He.active]:"CreateProgram"===o}),onClick:Pe},r.a.createElement(y.a,null,r.a.createElement(k.a,{badgeContent:z>0?z:void 0,color:"error"},r.a.createElement(R.a,{color:"CreateProgram"!==o?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"CreateProgram"!==o?"secondary":"primary"},"Create Program"))))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>d(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(ue.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"Character")}),h?r.a.createElement(ge.a,{color:"primary"}):r.a.createElement(be.a,{color:"primary"})),r.a.createElement(v.a,{in:h,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Stats",className:Object(i.a)({[He.active]:"Stats"===o}),onClick:ye},r.a.createElement(y.a,null,r.a.createElement(I.a,{color:N?"error":"Stats"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:N?"error":"Stats"!==o?"secondary":"primary"},"Stats"))),Q&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Factions",className:Object(i.a)({[He.active]:"Factions"===o}),onClick:Ne},r.a.createElement(y.a,null,r.a.createElement(k.a,{badgeContent:0!==K?K:void 0,color:"error"},r.a.createElement(F.a,{color:"Factions"!==o?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Factions"!==o?"secondary":"primary"},"Factions"))),Z&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Augmentations",className:Object(i.a)({[He.active]:"Augmentations"===o}),onClick:Ie},r.a.createElement(y.a,null,r.a.createElement(k.a,{badgeContent:0!==U?U:void 0,color:"error"},r.a.createElement(B.a,{style:{transform:"rotate(-90deg)"},color:"Augmentations"!==o?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Augmentations"!==o?"secondary":"primary"},"Augmentations"))),r.a.createElement(g.a,{button:!0,key:"Hacknet",className:Object(i.a)({[He.active]:"Hacknet"===o}),onClick:je},r.a.createElement(y.a,null,r.a.createElement(G.a,{color:D?"error":"Hacknet"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:D?"error":"Hacknet"!==o?"secondary":"primary"},"Hacknet"))),te&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Sleeves",className:Object(i.a)({[He.active]:"Sleeves"===o}),onClick:function(){s("Sleeves"),e.engine.loadSleevesContent()}},r.a.createElement(y.a,null,r.a.createElement(H.a,{color:"Sleeves"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Sleeves"!==o?"secondary":"primary"},"Sleeves")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>S(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(he.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"World")}),C?r.a.createElement(ge.a,{color:"primary"}):r.a.createElement(be.a,{color:"primary"})),r.a.createElement(v.a,{in:C,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"City",className:Object(i.a)({[He.active]:"City"===o}),onClick:Fe},r.a.createElement(y.a,null,r.a.createElement(q.a,{color:L?"error":"City"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:L?"error":"City"!==o?"secondary":"primary"},"City"))),r.a.createElement(g.a,{button:!0,key:"Travel",className:Object(i.a)({[He.active]:"Travel"===o}),onClick:De},r.a.createElement(y.a,null,r.a.createElement($.a,{color:"Travel"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Travel"!==o?"secondary":"primary"},"Travel"))),se&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Job",className:Object(i.a)({[He.active]:"Job"===o}),onClick:Be},r.a.createElement(y.a,null,r.a.createElement(Y.a,{color:"Job"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Job"!==o?"secondary":"primary"},"Job"))),ce&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Stock Market",className:Object(i.a)({[He.active]:"StockMarket"===o}),onClick:function(){s("StockMarket"),e.engine.loadStockMarketContent()}},r.a.createElement(y.a,null,r.a.createElement(J.a,{color:"StockMarket"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"StockMarket"!==o?"secondary":"primary"},"Stock Market"))),me&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Bladeburner",className:Object(i.a)({[He.active]:"Bladeburner"===o}),onClick:Le},r.a.createElement(y.a,null,r.a.createElement(X.a,{color:"Bladeburner"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Bladeburner"!==o?"secondary":"primary"},"Bladeburner"))),ne&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Corp",className:Object(i.a)({[He.active]:"Corp"===o}),onClick:function(){s("Corp"),e.engine.loadCorporationContent()}},r.a.createElement(y.a,null,r.a.createElement(ee.a,{color:"Corp"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Corp"!==o?"secondary":"primary"},"Corp"))),ie&&r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,key:"Gang",className:Object(i.a)({[He.active]:"Gang"===o}),onClick:Ge},r.a.createElement(y.a,null,r.a.createElement(ae.a,{color:"Gang"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Gang"!==o?"secondary":"primary"},"Gang")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:He.listitem},button:!0,onClick:()=>M(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(de.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,{color:"primary"},"Help")}),O?r.a.createElement(ge.a,{color:"primary"}):r.a.createElement(be.a,{color:"primary"})),r.a.createElement(v.a,{in:O,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Milestones",className:Object(i.a)({[He.active]:"Milestones"===o}),onClick:function(){s("Milestones"),e.engine.loadMilestonesContent()}},r.a.createElement(y.a,null,r.a.createElement(re.a,{color:"Milestones"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Milestones"!==o?"secondary":"primary"},"Milestones"))),r.a.createElement(g.a,{button:!0,key:"Tutorial",className:Object(i.a)({[He.active]:"Tutorial"===o}),onClick:We},r.a.createElement(y.a,null,r.a.createElement(oe.a,{color:W?"error":"Tutorial"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:W?"error":"Tutorial"!==o?"secondary":"primary"},"Tutorial"))),r.a.createElement(g.a,{button:!0,key:"Options",className:Object(i.a)({[He.active]:"Options"===o}),onClick:function(){s("Options"),e.engine.loadGameOptionsContent()}},r.a.createElement(y.a,null,r.a.createElement(le.a,{color:"Options"!==o?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:"Options"!==o?"secondary":"primary"},"Options"))),!1))))}},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(466),o=a(885),s=a(17),l=a(886),c=a(41);function u(e){if(0===Object.keys(c.a).sort().filter(t=>void 0===e.corp.divisions.find(e=>e.type===t)).sort().length)return r.a.createElement(r.a.Fragment,null);return r.a.createElement(i.a,{current:!1,onClick:function(){const t="cmpy-mgmt-expand-industry-popup";Object(s.a)(t,o.a,{corp:e.corp,setDivisionName:e.setDivisionName,popupId:t})},text:"Expand into new Industry"})}function m(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[o,s]=Object(n.useState)("Overview");return Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]),r.a.createElement("div",{className:"cmpy-mgmt-container"},r.a.createElement("div",null,r.a.createElement(i.a,{current:"Overview"===o,key:"overview",onClick:()=>s("Overview"),text:e.corp.name}),e.corp.divisions.map(e=>r.a.createElement(i.a,{current:e.name===o,key:e.name,onClick:()=>s(e.name),text:e.name})),r.a.createElement(u,{corp:e.corp,setDivisionName:s})),r.a.createElement(l.a,{rerender:a,corp:e.corp,divisionName:o,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(41),l=a(54);function c(e){const t=Object.keys(s.a).sort().filter(t=>void 0===e.corp.divisions.find(e=>e.type===t)).sort(),[a,c]=Object(n.useState)(t.length>0?t[0]:""),[u,m]=Object(n.useState)("");function h(){try{Object(l.l)(e.corp,a,u)}catch(e){return void Object(i.a)(e+"")}e.setDivisionName(u),Object(o.b)(e.popupId)}const p=s.b[a];if(void 0===p)throw new Error(`Trying to create an industry that doesn't exists: '${a}'`);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Create a new division to expand into a new industry:"),r.a.createElement("select",{className:"dropdown",defaultValue:a,onChange:function(e){c(e.target.value)}},t.map(e=>r.a.createElement("option",{key:e,value:e},e))),r.a.createElement("p",null,p(e.corp)),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",null,"Division name:"),r.a.createElement("input",{autoFocus:!0,value:u,onChange:function(e){m(e.target.value)},onKeyDown:function(e){13===e.keyCode&&h()},type:"text",className:"text-input",style:{display:"block"},maxLength:30,pattern:"[a-zA-Z0-9-_]"}),r.a.createElement("span",{onClick:h,className:"popup-box-button"},"Create Division"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(887),o=a(910),s=a(21);function l(e){const t="Overview"!==e.divisionName?e.corp.divisions.find(t=>t.name===e.divisionName):void 0;return void 0===t?r.a.createElement("div",{id:"cmpy-mgmt-panel"},r.a.createElement(o.a,e)):r.a.createElement("div",{id:"cmpy-mgmt-panel"},r.a.createElement(i.a,{rerender:e.rerender,division:t,corp:e.corp,city:s.a.Sector12,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(529),o=a(888),s=a(17),l=a(889);function c(e){return 0===Object.keys(e.division.offices).filter(t=>0===e.division.offices[t]).length?r.a.createElement(r.a.Fragment,null):r.a.createElement(i.a,{current:!1,key:"Expand into new City",name:"Expand into new City",onClick:function(){const t="cmpy-mgmt-expand-city-popup";Object(s.a)(t,o.a,{popupId:t,corp:e.corp,division:e.division,cityStateSetter:e.setCity})}})}function u(e){const[t,a]=Object(n.useState)(e.city),o=e.division.offices[t];return 0===o?(a("Sector-12"),r.a.createElement(r.a.Fragment,null)):r.a.createElement(r.a.Fragment,null,Object.values(e.division.offices).map(e=>0!==e&&r.a.createElement(i.a,{current:t===e.loc,key:e.loc,name:e.loc,onClick:()=>a(e.loc)})),r.a.createElement(c,{corp:e.corp,division:e.division,setCity:a}),r.a.createElement(l.a,{rerender:e.rerender,corp:e.corp,division:e.division,city:t,warehouse:e.division.warehouses[t],office:o,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(34),o=a(17),s=a(9),l=a(54),c=a(91);function u(e){const t=Object(n.useRef)(null);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Would you like to expand into a new city by opening an office? This would cost"," ",r.a.createElement(c.a,{money:i.a.OfficeInitialCost,corp:e.corp})),r.a.createElement("select",{ref:t,className:"dropdown",style:{margin:"5px"}},Object.keys(e.division.offices).filter(t=>0===e.division.offices[t]).map(e=>r.a.createElement("option",{key:e,value:e},e))),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:function(){if(null!==t.current){try{Object(l.k)(e.corp,e.division,t.current.value)}catch(e){return void Object(s.a)(e+"")}Object(s.a)(`Opened a new office in ${t.current.value}!`),e.cityStateSetter(t.current.value),Object(o.b)(e.popupId)}},disabled:e.corp.funds.lt(0)},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(890),o=a(894),s=a(898);function l(e){return r.a.createElement("div",null,r.a.createElement("div",{className:"cmpy-mgmt-industry-left-panel"},r.a.createElement(o.a,{rerender:e.rerender,player:e.player,corp:e.corp,division:e.division,currentCity:e.city,office:e.office}),r.a.createElement(i.a,{rerender:e.rerender,player:e.player,corp:e.corp,division:e.division,office:e.office})),r.a.createElement("div",{className:"cmpy-mgmt-industry-right-panel"},r.a.createElement(s.a,{rerender:e.rerender,player:e.player,corp:e.corp,currentCity:e.city,division:e.division,warehouse:e.warehouse})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(36),o=a(2),s=a(530),l=a(17),c=a(891),u=a(892),m=a(893),h=a(11);function p(e,t){let a=0;for(let n=0;ne.switchMode(e=>!e)},"Switch to Auto Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job")):r.a.createElement("button",{className:"std-button tooltip",onClick:()=>e.switchMode(e=>!e)},"Switch to Manual Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs"))}function f(e){const[t,a]=Object(n.useState)(e.office.employees.length>0?e.office.employees[0]:null),l=[];for(let t=0;t0?"std-button":"a-link-button-inactive",onClick:function(){a<=0?console.warn("Cannot assign employee. No unassigned employees available"):(e.office.assignEmployeeToJob(e.job),e.office.calculateEmployeeProductivity(e.corp,e.division),e.rerender())}},"+"),r.a.createElement("button",{className:t>0?"std-button":"a-link-button-inactive",onClick:function(){e.office.unassignEmployeeFromJob(e.job),e.office.calculateEmployeeProductivity(e.corp,e.division),e.rerender()}},"-"),r.a.createElement("br",null))}function y(e){const t=p(e.office.employees,i.a.Unassigned),a=1===e.corp.unlockUpgrades[4];let n=0,s=0,l=0,c=0;for(let t=0;t0&&(u=n/e.office.employees.length,m=s/e.office.employees.length,d=l/e.office.employees.length),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("strong",null,"Unassigned Employees: ",t)),r.a.createElement("br",null),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Avg Employee Morale:")),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(u,"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Avg Employee Happiness:")),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(m,"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Avg Employee Energy:")),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(d,"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Total Employee Salary:")),r.a.createElement("td",null,r.a.createElement("p",null,r.a.createElement(h.a,{money:c})))),a&&r.a.createElement(r.a.Fragment,null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Material Production:",r.a.createElement("span",{className:"tooltiptext"},"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"))),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(e.division.getOfficeProductivity(e.office),"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Product Production:",r.a.createElement("span",{className:"tooltiptext"},"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"))),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(e.division.getOfficeProductivity(e.office,{forProduct:!0}),"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Business Multiplier:",r.a.createElement("span",{className:"tooltiptext"},"The effect this office's 'Business' employees has on boosting sales"))),r.a.createElement("td",null,r.a.createElement("p",null,"x",o.a.format(e.division.getBusinessFactor(e.office),"0.000"))))))),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Operations,desc:"Manages supply chain operations. Improves the amount of Materials and Products you produce."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Engineer,desc:"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)"}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Business,desc:"Handles sales and finances. Improves the amount of Materials and Products you can sell."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Management,desc:"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.RandD,desc:"Research new innovative ways to improve the company. Generates Scientific Research."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Training,desc:"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations."}))}function b(e){const[t,a]=Object(n.useState)(!1),i={fontSize:"13px"};let o="tooltip";e.office.atCapacity()?o+=" a-link-button-inactive":(o+=" std-button",0===e.office.employees.length&&(o+=" flashing-button"));let s="tooltip";return e.office.atCapacity()?s+=" a-link-button-inactive":s+=" std-button",r.a.createElement("div",{className:"cmpy-mgmt-employee-panel"},r.a.createElement("h1",{style:{margin:"4px 0px 5px 0px"}},"Office Space"),r.a.createElement("p",null,"Size: ",e.office.employees.length," / ",e.office.size," employees"),r.a.createElement("button",{className:o,onClick:function(){const t="cmpy-mgmt-hire-employee-popup";Object(l.a)(t,u.a,{rerender:e.rerender,office:e.office,corp:e.corp,popupId:t,player:e.player})},style:i},"Hire Employee",0===e.office.employees.length&&r.a.createElement("span",{className:"tooltiptext"},"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position")),r.a.createElement("button",{className:s,onClick:function(){e.office.atCapacity()||(e.office.hireRandomEmployee(),e.rerender())},style:i},"Autohire Employee",r.a.createElement("span",{className:"tooltiptext"},"Automatically hires an employee and gives him/her a random name")),r.a.createElement("br",null),r.a.createElement("button",{className:"std-button tooltip",onClick:function(){const t="cmpy-mgmt-upgrade-office-size-popup";Object(l.a)(t,c.a,{rerender:e.rerender,office:e.office,corp:e.corp,popupId:t,player:e.player})},style:i,disabled:e.corp.funds.lt(0)},"Upgrade size",r.a.createElement("span",{className:"tooltiptext"},"Upgrade the office's size so that it can hold more employees!")),!e.division.hasResearch("AutoPartyManager")&&r.a.createElement("button",{className:"std-button tooltip",onClick:function(){const t="cmpy-mgmt-throw-office-party-popup";Object(l.a)(t,m.a,{office:e.office,corp:e.corp,popupId:t})},style:i,disabled:e.corp.funds.lt(0)},"Throw Party",r.a.createElement("span",{className:"tooltiptext"},'"Throw an office party to increase your employee\'s morale and happiness"')),r.a.createElement("br",null),r.a.createElement("div",null,r.a.createElement(d,{manualMode:t,switchMode:a})),t?r.a.createElement(f,{rerender:e.rerender,corp:e.corp,division:e.division,office:e.office,player:e.player}):r.a.createElement(y,{rerender:e.rerender,corp:e.corp,division:e.division,office:e.office,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(17),o=a(2),s=a(9),l=a(34),c=a(54);function u(e){const t=Math.round(e.office.size/l.a.OfficeInitialSize),a=l.a.OfficeInitialCost*Math.pow(1.09,t);let n=0;for(let e=0;e<5;++e)n+=Math.pow(1.09,t+e);const u=l.a.OfficeInitialCost*n,m=e.corp.funds.dividedBy(l.a.OfficeInitialCost).toNumber();let h=1;for(n=Math.pow(1.09,t);h<50&&!(n>=m);){const e=Math.pow(1.09,t+h);if(n+e>m)break;n+=e,++h}const p=l.a.OfficeInitialCost*n;function d(t,a){e.corp.funds.lt(t)?Object(s.a)("You don't have enough company funds to purchase this upgrade!"):(Object(c.y)(e.corp,e.office,a),Object(s.a)("Office space increased! It can now hold "+e.office.size+" employees"),e.rerender()),Object(i.b)(e.popupId)}function f(e){return r.a.createElement("button",{className:"tooltip "+(e.corp.funds.lt(e.cost)?"a-link-button-inactive":"a-link-button"),style:{display:"inline-block",margin:"4px"},onClick:()=>d(e.cost,e.size)},"by ",e.size,r.a.createElement("span",{className:"tooltiptext"},o.a.formatMoney(e.cost)))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Increase the size of your office space to fit additional employees!"),r.a.createElement("p",null,"Upgrade size: "),r.a.createElement(f,{corp:e.corp,cost:a,size:l.a.OfficeInitialSize}),r.a.createElement(f,{corp:e.corp,cost:u,size:5*l.a.OfficeInitialSize}),r.a.createElement(f,{corp:e.corp,cost:p,size:h*l.a.OfficeInitialSize}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(17),o=a(2),s=a(34),l=a(16),c=a(12),u=a(339),m=a(9);function h(e){const[t,a]=Object(n.useState)("");function o(){for(let a=0;a
This division's production multiplier is calculated by summing the individual production multiplier of each of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial to expand into new cities as this can greatly increase the production multiplier of your entire Division.

Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):

Hardware:    ${t(e.division.hwFac)}
Robots:      ${t(e.division.robFac)}
AI Cores:    ${t(e.division.aiFac)}
Real Estate: `+t(e.division.reFac))}},"?"),r.a.createElement("br",null)," ",r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip"},"Scientific Research: ",s.a.format(e.division.sciResearch.qty,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Scientific Research increases the quality of the materials and products that you produce.")),r.a.createElement("button",{className:"help-tip",onClick:function(){const t="corporation-research-popup-box";Object(h.a)(t,m.a,{industry:e.division,popupId:t})}},"Research"))}(),r.a.createElement("br",null),r.a.createElement("u",{className:"industry-purchases-and-upgrades-header"},"Purchases & Upgrades"),r.a.createElement("br",null),function(){const a=[];for(const i in o.a){const s=o.a[i];if(e.division.hasResearch("AutoBrew")&&"Coffee"===s[4])continue;const l=s[0],c=s[1],u=s[2];let m=0;switch(l){case 0:m=e.office.employees.length*c;break;default:m=c*Math.pow(u,e.division.upgrades[l])}function n(){e.corp.funds.lt(m)||(e.corp.funds=e.corp.funds.minus(m),e.division.upgrade(s,{corporation:e.corp,office:e.office}),e.rerender())}a.push(t({key:i,onClick:n,text:r.a.createElement(r.a.Fragment,null,s[4]," - ",r.a.createElement(d.a,{money:m,corp:e.corp})),tooltip:s[5]}))}return a}()," ",r.a.createElement("br",null),e.division.makesProducts&&a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(41),l=a(54);function c(e){const t=Object.keys(e.division.offices).filter(t=>0!==e.division.offices[t]),[a,c]=Object(n.useState)(t.length>0?t[0]:""),[u,m]=Object(n.useState)(""),[h,p]=Object(n.useState)(null),[d,f]=Object(n.useState)(null);if(e.division.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);function g(){if(null!==h&&null!==d){try{Object(l.j)(e.corp,e.division,a,u,h,d)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.popupText}}),r.a.createElement("select",{className:"dropdown",style:{margin:"5px"},onChange:function(e){c(e.target.value)},defaultValue:a},t.map(e=>r.a.createElement("option",{key:e,value:e},e))),r.a.createElement("input",{onChange:function(e){m(e.target.value)},className:"text-input",style:{margin:"5px"},placeholder:(y=e.division.type,y===s.a.Food?"Restaurant Name":y===s.a.Healthcare?"Hospital Name":y===s.a.RealEstate?"Property Name":"Product Name")}),r.a.createElement("br",null),r.a.createElement("input",{onChange:function(e){""===e.target.value?p(null):p(parseFloat(e.target.value))},autoFocus:!0,type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Design investment"}),r.a.createElement("input",{onChange:function(e){""===e.target.value?f(null):f(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&g()},type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Marketing investment"}),r.a.createElement("button",{className:"std-button",onClick:g},"Develop Product"));var y}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(41),l=a(34),c=a(897),u=a(54);function m(e){const t=s.c[e.industry.type];return void 0===t?r.a.createElement(r.a.Fragment,null):(Object(n.useEffect)(()=>{{const t=document.getElementById(e.popupId+"-content");null!=t&&(t.style.minHeight="80vh")}const a=t.createTreantMarkup();a.chart.container="#"+e.popupId+"-content",a.chart.nodeAlign="BOTTOM",a.chart.rootOrientation="WEST",a.chart.siblingSeparation=40,a.chart.connectors={type:"step",style:{"arrow-end":"block-wide-long",stroke:"white","stroke-width":2}},Object(c.Treant)(a);const n=t.getAllNodes();for(let t=0;t{try{Object(u.n)(e.industry,n[t])}catch(e){Object(i.a)(e+"")}Object(i.a)(`Researched ${n[t]}. It may take a market cycle (~${l.a.SecsPerMarketCycle} seconds) before the effects of the Research apply.`),Object(o.b)(e.popupId)}):console.warn("Could not find Research Tree div for "+a)}}),r.a.createElement("div",{id:e.popupId},r.a.createElement("div",{id:e.popupId+"outer-box"}),r.a.createElement("div",null,"Multipliers from research:",r.a.createElement("br",null),"* Advertising Multiplier: x",t.getAdvertisingMultiplier(),r.a.createElement("br",null),"* Employee Charisma Multiplier: x",t.getEmployeeChaMultiplier(),r.a.createElement("br",null),"* Employee Creativity Multiplier: x",t.getEmployeeCreMultiplier(),r.a.createElement("br",null),"* Employee Efficiency Multiplier: x",t.getEmployeeEffMultiplier(),r.a.createElement("br",null),"* Employee Intelligence Multiplier: x",t.getEmployeeIntMultiplier(),r.a.createElement("br",null),"* Production Multiplier: x",t.getProductionMultiplier(),r.a.createElement("br",null),"* Sales Multiplier: x",t.getSalesMultiplier(),r.a.createElement("br",null),"* Scientific Research Multiplier: x",t.getScientificResearchMultiplier(),r.a.createElement("br",null),"* Storage Multiplier: x",t.getStorageMultiplier())))}},,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return IndustryWarehouse}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_data_Constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(34),_OfficeSpace__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(275),_Material__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(128),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(296),_Warehouse__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(172),_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(899),_ExportPopup__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(900),_LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(901),_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(902),_SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(903),_SellProductPopup__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(904),_PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(905),_ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(906),_SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(907),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(2),_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(17),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(82),_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(11),_MoneyCost__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(91),_Helpers__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(908),_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(909),_Actions__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(54);function ProductComponent(props){const corp=props.corp,division=props.division,city=props.city,product=props.product,nf="0.000",nfB="0.000a",hasUpgradeDashboard=division.hasResearch("uPgrade: Dashboard"),totalGain=product.data[city][1]-product.data[city][2];let sellButtonText;if(sellButtonText=product.sllman[city][0]?Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(product.sllman[city][1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][2],nfB),"/",product.sllman[city][1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][2],nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.sllman[city][1],nfB),")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)"),product.marketTa2)sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:product.marketTa2Price[city]}));else if(product.marketTa1){const e=product.rat/product.mku;sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:product.pCost+e}))}else if(product.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(product.sCost)){const sCost=product.sCost.replace(/MP/g,product.pCost+"");sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:eval(sCost)}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:product.sCost}));function openSellProductPopup(){const e="cmpy-mgmt-limit-product-production-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_SellProductPopup__WEBPACK_IMPORTED_MODULE_11__.a,{product:product,city:city,popupId:e})}let limitProductionButtonText="Limit Production";function openLimitProductProdutionPopup(){const e="cmpy-mgmt-limit-product-production-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__.a,{product:product,city:city,popupId:e})}function openDiscontinueProductPopup(){const e="cmpy-mgmt-discontinue-product-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__.a,{rerender:props.rerender,product:product,industry:division,corp:props.corp,popupId:e,player:props.player})}function openProductMarketTaPopup(){const e="cmpy-mgmt-marketta-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__.a,{product:product,industry:division,popupId:e})}return product.prdman[city][0]&&(limitProductionButtonText+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.prdman[city][1],nf)+")"),product.fin?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},product.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][0],nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(totalGain,nfB),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][1],nfB),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][2],nfB)," /s")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.rat,nf),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.qlt,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.per,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.dur,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.rel,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.aes,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.fea,nf),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.cmp,nf))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Production Cost:"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatMoney(product.pCost/_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.ProductProductionCostRatio),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of the material cost it takes to create this Product.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatMoney(product.pCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openSellProductPopup},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openLimitProductProdutionPopup},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openDiscontinueProductPopup},"Discontinue"),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openProductMarketTaPopup},"Market-TA"))):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Designing ",product.name," (req. Operations/Engineers in ",product.createCity,")..."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.prog,"0.00"),"% complete"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),hasUpgradeDashboard&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openSellProductPopup},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openLimitProductProdutionPopup},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openDiscontinueProductPopup},"Discontinue"),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openProductMarketTaPopup},"Market-TA")))}function MaterialComponent(props){const corp=props.corp,division=props.division,warehouse=props.warehouse,city=props.city,mat=props.mat,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__.a))throw new Error(`Could not get OfficeSpace object for this city (${city})`);const nf="0.000",nfB="0.000a",totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,tutorial=division.newInd&&Object.keys(division.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,purchaseButtonText=`Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.buy,nfB)})`,purchaseButtonClass=tutorial?"std-button flashing-button tooltip":"std-button";function openPurchaseMaterialPopup(){const e="cmpy-mgmt-material-purchase-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__.a,{mat:mat,industry:division,warehouse:warehouse,corp:props.corp,popupId:e})}function openExportPopup(){const e="cmpy-mgmt-export-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_ExportPopup__WEBPACK_IMPORTED_MODULE_7__.a,{mat:mat,corp:props.corp,popupId:e})}let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(mat.sllman[1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sll,nfB),"/",mat.sllman[1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sll,nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sllman[1],nfB),")"),mat.marketTa2)sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:mat.marketTa2Price}));else if(mat.marketTa1)sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:mat.bCost+markupLimit}));else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(mat.sCost)){const sCost=mat.sCost.replace(/MP/g,mat.bCost+"");sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:eval(sCost)}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:mat.sCost}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)");function openSellMaterialPopup(){const e="cmpy-mgmt-material-sell-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__.a,{mat:mat,corp:props.corp,popupId:e})}function openMaterialMarketTaPopup(){const e="cmpy-mgmt-export-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__.a,{mat:mat,industry:division,corp:props.corp,popupId:e})}function shouldFlash(){return props.division.prodMats.includes(props.mat.name)&&!mat.sllman[0]}return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-material-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(totalGain,nfB),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.imp,nfB),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.cmp,nf))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatMoney(mat.bCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Market Price: The price you would pay if you were to buy this material on the market"))," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.qlt,"0.00a"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"The quality of your material. Higher quality will lead to more sales"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:purchaseButtonClass,onClick:openPurchaseMaterialPopup,disabled:props.warehouse.smartSupplyEnabled&&Object.keys(props.division.reqMats).includes(props.mat.name)},purchaseButtonText,tutorial&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Purchase your required materials to get production started!")),1===corp.unlockUpgrades[0]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openExportPopup},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button"+(shouldFlash()?" flashing-button":""),onClick:openSellMaterialPopup},sellButtonText),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openMaterialMarketTaPopup},"Market-TA")))}function IndustryWarehouse(e){return e.warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__.a?function(){if(0===e.warehouse)return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null);const t={color:e.warehouse.sizeUsed>=e.warehouse.size?"red":"white",margin:"5px"},a=_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseUpgradeBaseCost*Math.pow(1.07,e.warehouse.level+1),n=e.corp.funds.gt(a)?"std-button":"a-link-button-inactive",r=[];for(const t in e.division.reqMats)if(e.division.reqMats.hasOwnProperty(t)){const a=[" *",e.division.reqMats[t],t].join(" ");r.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:t},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,a)))}let i;switch(e.division.state){case"START":i="Current state: Preparing...";break;case"PURCHASE":i="Current state: Purchasing materials...";break;case"PRODUCTION":i="Current state: Producing materials and/or products...";break;case"SALE":i="Current state: Selling materials and/or products...";break;case"EXPORT":i="Current state: Exporting materials and/or products...";break;default:console.error("Invalid state: "+e.division.state)}const o=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof _Material__WEBPACK_IMPORTED_MODULE_3__.a&&Object(_Helpers__WEBPACK_IMPORTED_MODULE_20__.a)(t,e.division)&&o.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent,{rerender:e.rerender,city:e.currentCity,corp:e.corp,division:e.division,key:t,mat:e.warehouse.materials[t],warehouse:e.warehouse}));const s=[];if(e.division.makesProducts&&Object.keys(e.division.products).length>0)for(const t in e.division.products){const a=e.division.products[t];a instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.a&&s.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent,{rerender:e.rerender,player:e.player,city:e.currentCity,corp:e.corp,division:e.division,key:t,product:a}))}return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip",style:t},"Storage: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatBigNumber(e.warehouse.sizeUsed)," /"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatBigNumber(e.warehouse.size),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:e.warehouse.breakdown}})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:n,onClick:function(){null!==e.division&&0!==e.warehouse&&(++e.warehouse.level,e.warehouse.updateSize(e.corp,e.division),e.corp.funds=e.corp.funds.minus(a),e.rerender())}},"Upgrade Warehouse Size - ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__.a,{money:a,corp:e.corp})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"This industry uses the following equation for it's production: "),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__.a,{division:e.division}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,i),e.corp.unlockUpgrades[1]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:function(){if(0===e.warehouse)return;const t="cmpy-mgmt-smart-supply-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(t,_SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__.a,{division:e.division,warehouse:e.warehouse,corp:e.corp,player:e.player,popupId:t})}},"Configure Smart Supply")),o,s)}():react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:()=>{return t=e.division,a=e.currentCity,Object(_Actions__WEBPACK_IMPORTED_MODULE_22__.m)(e.corp,t,a),void e.rerender();var t,a},disabled:e.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost)},"Purchase Warehouse (",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__.a,{money:_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost,corp:e.corp}),")"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(17);function o(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no longer produce this product and all of its existing stock will be removed and left unsold"),r.a.createElement("button",{className:"popup-box-button",onClick:function(){e.industry.discontinueProduct(e.product),Object(i.b)(e.popupId),e.rerender()}},"Discontinue"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(54);function l(e){if(0===e.corp.divisions.length)throw new Error("Export popup created with no divisions.");if(0===Object.keys(e.corp.divisions[0].warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[t,a]=Object(n.useState)(e.corp.divisions[0].name),[l,c]=Object(n.useState)(Object.keys(e.corp.divisions[0].warehouses)[0]),[u,m]=Object(n.useState)(""),h=Object(n.useState)(!1)[1];function p(t){for(let a=0;a!e)}const d=e.corp.divisions.find(e=>e.name===t);if(void 0===d)throw new Error(`Export popup somehow ended up with undefined division '${d}'`);const f=Object.keys(d.warehouses).filter(e=>0!==d.warehouses[e]);return f.length>0&&!f.includes(l)&&c(f[0]),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse."),r.a.createElement("select",{className:"dropdown",onChange:function(e){a(e.target.value)},defaultValue:t},e.corp.divisions.map(e=>r.a.createElement("option",{key:e.name,value:e.name},e.name))),r.a.createElement("select",{className:"dropdown",onChange:function(e){c(e.target.value)},defaultValue:l},f.map(e=>{if(0!==d.warehouses[e])return r.a.createElement("option",{key:e,value:e},e)})),r.a.createElement("input",{className:"text-input",placeholder:"Export amount / s",onChange:function(e){m(e.target.value)}}),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:function(){try{Object(s.e)(t,l,e.mat,u)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}},"Export"),r.a.createElement("p",null,"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."),e.mat.exp.map((e,t)=>r.a.createElement("div",{key:t,className:"cmpy-mgmt-existing-export",onClick:()=>p(e)},"Industry: ",e.ind,r.a.createElement("br",null),"City: ",e.city,r.a.createElement("br",null),"Amount/s: ",e.amt)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(17),o=a(54);function s(e){const[t,a]=Object(n.useState)(null);function s(){let a=t;null===a&&(a=-1),Object(o.i)(e.product,e.city,a),Object(i.b)(e.popupId)}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit."),r.a.createElement("input",{autoFocus:!0,className:"text-input",style:{margin:"5px"},placeholder:"Limit",type:"number",onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&s()}}),r.a.createElement("button",{className:"std-button",style:{margin:"5px",display:"inline-block"},onClick:s},"Limit production"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(2);function o(e){if(!e.industry.hasResearch("Market-TA.II"))return r.a.createElement(r.a.Fragment,null);const[t,a]=Object(n.useState)(e.mat.bCost),o=Object(n.useState)(!1)[1];const s=e.mat.getMarkupLimit();const l=t;let c=1;return l>e.mat.bCost?l-e.mat.bCost>s&&(c=Math.pow(s/(l-e.mat.bCost),2)):l!e)},checked:e.mat.marketTa2,style:{margin:"3px"}})),r.a.createElement("p",null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function s(e){const t=Object(n.useState)(!1)[1];const a=e.mat.getMarkupLimit();return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.I")),r.a.createElement("br",null),"The maximum sale price you can mark this up to is ",i.a.formatMoney(e.mat.bCost+a),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa1-checkbox",style:{color:"white"}},"Use Market-TA.I for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)")),r.a.createElement("input",{id:"cmpy-mgmt-marketa1-checkbox",type:"checkbox",onChange:function(a){e.mat.marketTa1=a.target.checked,t(e=>!e)},checked:e.mat.marketTa1,style:{margin:"3px"}})),r.a.createElement(o,{mat:e.mat,industry:e.industry}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(54);function l(e){const[t,a]=Object(n.useState)(e.mat.sllman[1]?e.mat.sllman[1]+"":""),[l,c]=Object(n.useState)(function(e){let t=e.sCost?e.sCost+"":"";return e.marketTa2?t+=" (Market-TA.II)":e.marketTa1&&(t+=" (Market-TA.I)"),t}(e.mat));function u(){try{Object(s.o)(e.mat,t,l)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}function m(e){13===e.keyCode&&u()}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the maximum amount of ",e.mat.name," you would like to sell per second, as well as the price at which you would like to sell at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price."),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input",value:t,autoFocus:!0,type:"text",placeholder:"Sell amount",style:{marginTop:"4px"},onChange:function(e){a(e.target.value)},onKeyDown:m}),r.a.createElement("input",{className:"text-input",value:l,type:"text",placeholder:"Sell price",style:{marginTop:"4px"},onChange:function(e){c(e.target.value)},onKeyDown:m}),r.a.createElement("button",{className:"std-button",onClick:u},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(54);function l(e){const[t,a]=Object(n.useState)(!0),[l,c]=Object(n.useState)(e.product.sllman[e.city][1]?e.product.sllman[e.city][1]:""),[u,m]=Object(n.useState)(function(e){let t=e.sCost?e.sCost+"":"";return e.marketTa2?t+=" (Market-TA.II)":e.marketTa1&&(t+=" (Market-TA.I)"),t}(e.product));function h(){try{Object(s.p)(e.product,e.city,l,u,t)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}function p(e){13===e.keyCode&&h()}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the maximum amount of ",e.product.name," you would like to sell per second, as well as the price at which you would like to sell it at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price."),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input",value:l,autoFocus:!0,type:"text",placeholder:"Sell amount",style:{marginTop:"4px"},onChange:function(e){c(e.target.value)},onKeyDown:p}),r.a.createElement("input",{className:"text-input",value:u,type:"text",placeholder:"Sell price",style:{marginTop:"4px"},onChange:function(e){m(e.target.value)},onKeyDown:p}),r.a.createElement("button",{className:"std-button",onClick:h},"Confirm"),r.a.createElement("div",{style:{border:"1px solid white",display:"inline-block"}},r.a.createElement("label",{htmlFor:e.popupId+"-checkbox"},"Use same 'Sell Amount' for all cities"),r.a.createElement("input",{checked:t,onChange:function(e){a(e.target.checked)},id:e.popupId+"-checkbox",style:{margin:"2px"},type:"checkbox"})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(137),l=a(2),c=a(54);function u(e){const t=parseFloat(e.amount),a=t*e.mat.bCost,n=s.a[e.mat.name];return t*n>(e.warehouse.size-e.warehouse.sizeUsed)/n?r.a.createElement(r.a.Fragment,null,"Not enough warehouse space to purchase this amount"):isNaN(a)?r.a.createElement(r.a.Fragment,null,"Invalid put for Bulk Purchase amount"):r.a.createElement(r.a.Fragment,null,"Purchasing ",l.a.format(t,"0,0.00")," of ",e.mat.name," will cost"," ",l.a.formatMoney(a))}function m(e){const[t,a]=Object(n.useState)("");return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of ",e.mat.name," you would like to bulk purchase. This purchases the specified amount instantly (all at once)."),r.a.createElement(u,{warehouse:e.warehouse,mat:e.mat,amount:t}),r.a.createElement("input",{onChange:function(e){a(e.target.value)},type:"number",placeholder:"Bulk Purchase amount",style:{margin:"5px"},onKeyDown:function(a){13===a.keyCode&&function(){const a=parseFloat(t),n=s.a[e.mat.name];if(a*n>(e.warehouse.size-e.warehouse.sizeUsed)/n)Object(i.a)("You do not have enough warehouse size to fit this purchase");else if(isNaN(a))Object(i.a)("Invalid input amount");else{const t=a*e.mat.bCost;if(!e.corp.funds.gt(t))return void Object(i.a)("You cannot afford this purchase.");e.corp.funds=e.corp.funds.minus(t),e.mat.qty+=a,Object(o.b)(e.popupId)}}()}}),r.a.createElement("button",{className:"std-button"},"Confirm Bulk Purchase"))}function h(e){const[t,a]=Object(n.useState)(e.mat.buy?e.mat.buy:null);function s(){if(null!==t){try{Object(c.c)(e.mat,t)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of ",e.mat.name," you would like to purchase per second. This material's cost changes constantly."),r.a.createElement("input",{onChange:function(e){a(parseFloat(e.target.value))},className:"text-input",autoFocus:!0,placeholder:"Purchase amount",type:"number",style:{margin:"5px"},onKeyDown:function(e){13===e.keyCode&&s()}}),r.a.createElement("button",{onClick:s,className:"std-button"},"Confirm"),r.a.createElement("button",{onClick:function(){e.mat.buy=0,Object(o.b)(e.popupId)},className:"std-button"},"Clear Purchase"),e.industry.hasResearch("Bulk Purchasing")&&r.a.createElement(m,{corp:e.corp,mat:e.mat,industry:e.industry,warehouse:e.warehouse,popupId:e.popupId}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(2);function o(e){const t=e.product.rat/e.product.mku,[a,o]=Object(n.useState)(e.product.pCost),s=Object(n.useState)(!1)[1];const l=a;let c=1;return l>e.product.pCost&&l-e.product.pCost>t&&(c=t/(l-e.product.pCost)),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("br",null),r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.II")),r.a.createElement("br",null),"If you sell at ",i.a.formatMoney(l),", then you will sell"," ",i.a.format(c,"0.00000"),"x as much compared to if you sold at market price."),r.a.createElement("input",{className:"text-input",onChange:function(e){o(parseFloat(e.target.value))},value:a,type:"number",style:{marginTop:"4px"}}),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa2-checkbox",style:{color:"white"}},"Use Market-TA.II for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Product will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold).")),r.a.createElement("input",{className:"text-input",onChange:function(t){e.product.marketTa2=t.target.checked,s(e=>!e)},id:"cmpy-mgmt-marketa2-checkbox",style:{margin:"3px"},type:"checkbox",checked:e.product.marketTa2})),r.a.createElement("p",null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function s(e){const t=e.product.rat/e.product.mku,a=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.I")),r.a.createElement("br",null),"The maximum sale price you can mark this up to is"," ",i.a.formatMoney(e.product.pCost+t),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales."),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa1-checkbox",style:{color:"white"}},"Use Market-TA.I for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Product will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above).")),r.a.createElement("input",{onChange:function(t){e.product.marketTa1=t.target.checked,a(e=>!e)},className:"text-input",id:"cmpy-mgmt-marketa1-checkbox",style:{margin:"3px"},type:"checkbox",checked:e.product.marketTa1})),e.industry.hasResearch("Market-TA.II")&&r.a.createElement(o,{product:e.product,industry:e.industry,popupId:e.popupId}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(54),o=a(128),s=a(9);function l(e){const[t,a]=Object(n.useState)(!!e.warehouse.smartSupplyUseLeftovers[e.matName]);const o=e.matName+"-use-leftovers";return r.a.createElement("div",{key:e.matName},r.a.createElement("label",{style:{color:"white"},htmlFor:o},e.warehouse.materials[e.matName].name),r.a.createElement("input",{type:"checkbox",id:o,onChange:function(t){try{const a=e.warehouse.materials[e.matName];Object(i.v)(e.warehouse,a,t.target.checked)}catch(e){Object(s.a)(e+"")}a(t.target.checked)},style:{margin:"3px"},checked:t}),r.a.createElement("br",null))}function c(e){const t=Object(n.useState)(!1)[1];const a=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof o.a&&Object.keys(e.division.reqMats).includes(t)&&a.push(r.a.createElement(l,{key:t,warehouse:e.warehouse,matName:t}));return r.a.createElement(r.a.Fragment,null,r.a.createElement("label",{style:{color:"white"},htmlFor:"cmpy-mgmt-smart-supply-checkbox"},"Enable Smart Supply"),r.a.createElement("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",onChange:function(a){Object(i.u)(e.warehouse,a.target.checked),t(e=>!e)},style:{margin:"3px"},checked:e.warehouse.smartSupplyEnabled}),r.a.createElement("br",null),r.a.createElement("p",null,"Use materials already in the warehouse instead of buying new ones, if available:"),a)}},function(e,t,a){"use strict";function n(e,t){return!!Object.keys(t.reqMats).includes(e)||(!!t.prodMats.includes(e)||!!["Hardware","Robots","AICores","RealEstate"].includes(e))}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(194);function o(e){const t=[];for(const a of Object.keys(e.division.reqMats)){const n=e.division.reqMats[a];void 0!==n&&t.push(String.raw`${n}\text{ }${a}`)}const a=e.division.prodMats.slice();return e.division.makesProducts&&a.push(e.division.type),r.a.createElement("span",{className:"text"},r.a.createElement(i.a,{display:!1,tex:t.join("+")+String.raw`\Rightarrow`+a.map(e=>String.raw`1\text{ }${e}`).join("+")}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(911),o=a(912),s=a(913),l=a(914),c=a(915),u=a(916),m=a(917),h=a(918),p=a(919),d=a(34),f=a(322),g=a(323),y=a(5),b=a(2),E=a(12),v=a(17),k=a(11);function _({corp:e,player:t,rerender:a}){const n=e.revenue.minus(e.expenses).toNumber();return r.a.createElement("div",null,r.a.createElement("p",null,"Total Funds: ",r.a.createElement(k.a,{money:e.funds.toNumber()}),r.a.createElement("br",null),"Total Revenue: ",r.a.createElement(k.a,{money:e.revenue.toNumber()})," / s",r.a.createElement("br",null),"Total Expenses: ",r.a.createElement(k.a,{money:e.expenses.toNumber()})," / s",r.a.createElement("br",null),"Total Profits: ",r.a.createElement(k.a,{money:n})," / s",r.a.createElement("br",null),r.a.createElement(T,{corp:e,profit:n}),"Publicly Traded: ",e.public?"Yes":"No",r.a.createElement("br",null),"Owned Stock Shares: ",b.a.format(e.numShares,"0.000a"),r.a.createElement("br",null),"Stock Price: ",e.public?r.a.createElement(k.a,{money:e.sharePrice}):"N/A",r.a.createElement("br",null)),r.a.createElement("p",{className:"tooltip"},"Total Stock Shares: ",b.a.format(e.totalShares,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Outstanding Shares: ",b.a.format(e.issuedShares,"0.000a"),r.a.createElement("br",null),"Private Shares: ",b.a.format(e.totalShares-e.issuedShares-e.numShares,"0.000a"))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(M,{name:"Production Multiplier: ",mult:e.getProductionMultiplier()}),r.a.createElement(M,{name:"Storage Multiplier: ",mult:e.getStorageMultiplier()}),r.a.createElement(M,{name:"Advertising Multiplier: ",mult:e.getAdvertisingMultiplier()}),r.a.createElement(M,{name:"Empl. Creativity Multiplier: ",mult:e.getEmployeeCreMultiplier()}),r.a.createElement(M,{name:"Empl. Charisma Multiplier: ",mult:e.getEmployeeChaMultiplier()}),r.a.createElement(M,{name:"Empl. Intelligence Multiplier: ",mult:e.getEmployeeIntMultiplier()}),r.a.createElement(M,{name:"Empl. Efficiency Multiplier: ",mult:e.getEmployeeEffMultiplier()}),r.a.createElement(M,{name:"Sales Multiplier: ",mult:e.getSalesMultiplier()}),r.a.createElement(M,{name:"Scientific Research Multiplier: ",mult:e.getScientificResearchMultiplier()}),r.a.createElement("br",null),r.a.createElement(P,{corp:e}),r.a.createElement("div",null,r.a.createElement(x,{className:"a-link-button",display:"inline-block",onClick:()=>e.getStarterGuide(t),text:"Getting Started Guide",tooltip:"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file that guides you through the beginning of setting up a Corporation and provides some tips/pointers for helping you get started with managing it."}),e.public?r.a.createElement(S,{corp:e,player:t,rerender:a}):r.a.createElement(C,{corp:e,player:t,rerender:a}),r.a.createElement(O,{corp:e,player:t})),r.a.createElement("br",null),r.a.createElement(w,{corp:e,player:t,rerender:a}))}function C({corp:e,player:t,rerender:a}){const n=e.fundingRound<4,i=n?"std-button":"a-link-button-inactive",o=n?"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company":void 0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(x,{className:i,onClick:function(){const n="cmpy-mgmt-find-investors-popup";Object(v.a)(n,h.a,{rerender:a,player:t,popupId:n,corp:e})},text:"Find Investors",tooltip:o,display:"inline-block"}),r.a.createElement(x,{className:"std-button",onClick:function(){const n="cmpy-mgmt-go-public-popup";Object(v.a)(n,p.a,{rerender:a,player:t,popupId:n,corp:e})},display:"inline-block",text:"Go Public",tooltip:"Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a public company, your shares will be traded on the stock market."}),r.a.createElement("br",null))}function w({corp:e,player:t,rerender:a}){return e.divisions.length<=0?r.a.createElement("h1",null,"Upgrades are unlocked once you create an industry."):r.a.createElement("div",{className:"cmpy-mgmt-upgrade-container"},r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Unlocks "),Object.values(f.a).filter(t=>0===e.unlockUpgrades[t[0]]).map(n=>r.a.createElement(o.a,{rerender:a,player:t,corp:e,upgradeData:n,key:n[0]})),r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Upgrades "),e.upgrades.map((e,t)=>g.a[t]).map(n=>r.a.createElement(i.a,{rerender:a,player:t,corp:e,upgrade:n,key:n[0]})))}function S({corp:e,player:t,rerender:a}){const n=e.shareSaleCooldown>0,i=n?"a-link-button-inactive":"std-button",o=n?"Cannot sell shares for "+e.convertCooldownToString(e.shareSaleCooldown):"Sell your shares in the company. The money earned from selling your shares goes into your personal account, not the Corporation's. This is one of the only ways to profit from your business venture.",s=e.issueNewSharesCooldown>0,h=s?"a-link-button-inactive":"std-button",p=s?"Cannot issue new shares for "+e.convertCooldownToString(e.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.a.createElement(r.a.Fragment,null,r.a.createElement(x,{className:i,display:"inline-block",onClick:function(){const n="cmpy-mgmt-sell-shares-popup";Object(v.a)(n,l.a,{corp:e,player:t,popupId:n,rerender:a})},text:"Sell Shares",tooltip:o}),r.a.createElement(x,{className:"std-button",display:"inline-block",onClick:function(){const n="corp-buyback-shares-popup";Object(v.a)(n,c.a,{rerender:a,player:t,popupId:n,corp:e})},text:"Buyback shares",tooltip:"Buy back shares you that previously issued or sold at market price."}),r.a.createElement("br",null),r.a.createElement(x,{className:h,display:"inline-block",onClick:function(){const t="cmpy-mgmt-issue-new-shares-popup";Object(v.a)(t,m.a,{popupId:t,corp:e})},text:"Issue New Shares",tooltip:p}),r.a.createElement(x,{className:"std-button",display:"inline-block",onClick:function(){const t="cmpy-mgmt-issue-dividends-popup";Object(v.a)(t,u.a,{popupId:t,corp:e})},text:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)"}),r.a.createElement("br",null))}function x({className:e="std-button",text:t,display:a,tooltip:n,onClick:i}){const o=null!=n;return o&&(e+=" tooltip"),r.a.createElement("button",{className:e,onClick:i,style:{display:a||"block"}},t,o&&r.a.createElement("span",{className:"tooltiptext"},n))}function O({player:e,corp:t}){const a=t.determineValuation()>=d.a.BribeThreshold||!0,n=a?"a-link-button":"a-link-button-inactive";return r.a.createElement(x,{className:n,display:"inline-block",onClick:function(){Object(v.a)("corp-bribe-popup",s.a,{player:e,popupId:"corp-bribe-popup",corp:t})},text:"Bribe Factions",tooltip:a?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"})}function T({corp:e,profit:t}){if(e.dividendPercentage<=0||t<=0)return r.a.createElement(r.a.Fragment,null);const a=e.dividendPercentage/100*t,n=t-a,i=a/e.totalShares,o=e.numShares*i;return r.a.createElement(r.a.Fragment,null,"Retained Profits (after dividends): ",r.a.createElement(k.a,{money:n})," / s",r.a.createElement("br",null),r.a.createElement("br",null),"Dividend Percentage: ",b.a.format(e.dividendPercentage/100,"0%"),r.a.createElement("br",null),"Dividends per share: ",r.a.createElement(k.a,{money:i})," / s",r.a.createElement("br",null),"Your earnings as a shareholder (Pre-Tax): ",r.a.createElement(k.a,{money:o})," / s",r.a.createElement("br",null),"Dividend Tax Rate: ",e.dividendTaxPercentage,"%",r.a.createElement("br",null),"Your earnings as a shareholder (Post-Tax):"," ",r.a.createElement(k.a,{money:o*(1-e.dividendTaxPercentage/100)})," / s",r.a.createElement("br",null),r.a.createElement("br",null))}function M({name:e,mult:t}){return t<=1?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,e,b.a.format(t,"0.000"),r.a.createElement("br",null))}function P({corp:e}){const t=e.storedCycles*y.a.MilliPerCycle;return t<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,"Bonus time: ",Object(E.b)(t),r.a.createElement("br",null),r.a.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(54),s=a(91);function l(e){const t=e.upgrade,a=e.corp.upgrades[t[0]],n=t[1],l=t[2],c=n*Math.pow(l,a),u=r.a.createElement(r.a.Fragment,null,t[4]," - ",r.a.createElement(s.a,{money:c,corp:e.corp})),m=t[5];return r.a.createElement("button",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(c)){try{Object(o.h)(e.corp,e.upgrade)}catch(e){Object(i.a)(e+"")}e.rerender()}}},u,r.a.createElement("span",{className:"tooltiptext"},m))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(54),s=a(91);function l(e){const t=e.upgradeData,a=r.a.createElement(r.a.Fragment,null,t[2]," - ",r.a.createElement(s.a,{money:t[1],corp:e.corp})),n=t[3];return r.a.createElement("button",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(t[1])){try{Object(o.x)(e.corp,e.upgradeData)}catch(e){Object(i.a)(e+"")}e.rerender()}}},a,r.a.createElement("span",{className:"tooltiptext"},n))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(24),o=a(34),s=a(2),l=a(17),c=a(9);function u(e){const[t,a]=Object(n.useState)(0),[u,m]=Object(n.useState)(0),[h,p]=Object(n.useState)(e.player.factions.length>0?e.player.factions[0]:"");function d(t,a){return(t+a*e.corp.sharePrice)/o.a.BribeToRepRatio}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation."),r.a.createElement("select",{className:"dropdown",style:{margin:"3px"},defaultValue:h,onChange:function(e){p(e.target.value)}},e.player.factions.map(e=>{if(i.a[e].getInfo().offersWork())return r.a.createElement("option",{key:e,value:e},e)})),r.a.createElement("p",null,function(t,a){return 0===t&&0===a?"":isNaN(t)||isNaN(a)||t<0||a<0?"ERROR: Invalid value(s) entered":e.corp.funds.lt(t)?"ERROR: You do not have this much money to bribe with":a>e.corp.numShares?"ERROR: You do not have this many shares to bribe with":"You will gain "+s.a.formatReputation(d(t,a))+" reputation with "+h+" with this bribe"}(t||0,u||0)),r.a.createElement("input",{className:"text-input",onChange:function(e){a(parseFloat(e.target.value))},placeholder:"Corporation funds",style:{margin:"5px"}}),r.a.createElement("input",{className:"text-input",onChange:function(e){m(parseFloat(e.target.value))},placeholder:"Stock Shares",style:{margin:"5px"}}),r.a.createElement("button",{className:"a-link-button",onClick:()=>function(t,a){const n=i.a[h];if(null==n&&Object(c.a)("ERROR: You must select a faction to bribe"),isNaN(t)||isNaN(a)||t<0||a<0);else if(e.corp.funds.lt(t));else if(a>e.corp.numShares);else{const r=d(t,a);Object(c.a)("You gained "+s.a.formatReputation(r)+" reputation with "+n.name+" by bribing them."),n.playerReputation+=r,e.corp.funds=e.corp.funds.minus(t),e.corp.numShares-=a,Object(l.b)(e.popupId)}}(t||0,u||0),style:{display:"inline-block"}},"Bribe"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(2),o=a(9),s=a(17),l=a(34);function c(e){const[t,a]=Object(n.useState)(null);function c(){if(null!==t)if(isNaN(t)||t<=0)Object(o.a)("ERROR: Invalid value for number of shares");else if(t>e.corp.numShares)Object(o.a)("ERROR: You don't have this many shares to sell");else{const a=e.corp.calculateShareSale(t),n=a[0],r=a[1],c=a[2];if(e.corp.numShares-=t,isNaN(e.corp.issuedShares)){console.error("Corporation issuedShares is NaN: "+e.corp.issuedShares);const t=e.corp.issuedShares;isNaN(t)?e.corp.issuedShares=0:e.corp.issuedShares=t}e.corp.issuedShares+=t,e.corp.sharePrice=r,e.corp.shareSalesUntilPriceUpdate=c,e.corp.shareSaleCooldown=l.a.SellSharesCooldown,e.player.gainMoney(n),e.player.recordMoneySource(n,"corporation"),Object(s.b)(e.popupId),Object(o.a)(`Sold ${i.a.formatMoney(t)} shares for `+i.a.formatMoney(n)+". "+`The corporation's stock price fell to ${i.a.formatMoney(e.corp.sharePrice)} as a result of dilution.`),e.rerender()}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation).",r.a.createElement("br",null),r.a.createElement("br",null),"Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a large number of shares all at once will have an immediate effect in reducing your stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"The current price of your company's stock is ",i.a.formatMoney(e.corp.sharePrice)),r.a.createElement((function(e){if(null===e.shares)return r.a.createElement(r.a.Fragment,null);if(isNaN(e.shares)||e.shares<=0)return r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to sell");if(e.shares>e.corp.numShares)return r.a.createElement(r.a.Fragment,null,"You don't have this many shares to sell!");{const t=e.corp.calculateShareSale(e.shares)[0];return r.a.createElement(r.a.Fragment,null,"Sell ",e.shares," shares for a total of ",i.a.formatMoney(t))}}),{shares:t,corp:e.corp}),r.a.createElement("br",null),r.a.createElement("input",{autoFocus:!0,className:"text-input",type:"number",placeholder:"Shares to sell",style:{margin:"5px"},onChange:function(e){""===e.target.value?a(null):a(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{onClick:c,className:"a-link-button",style:{display:"inline-block"}},"Sell shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(17),o=a(2),s=a(9);function l(e){const[t,a]=Object(n.useState)(null);const l=1.1*e.corp.sharePrice;function c(){if(null===t)return;const a=1.1*e.corp.sharePrice;if(isNaN(t)||t<=0)Object(s.a)("ERROR: Invalid value for number of shares");else if(t>e.corp.issuedShares)Object(s.a)("ERROR: There are not this many oustanding shares to buy back");else if(t*a>e.player.money)Object(s.a)("ERROR: You do not have enough money to purchase this many shares (you need "+o.a.format(t*a,"$0.000a")+")");else{if(e.corp.numShares+=t,isNaN(e.corp.issuedShares)){console.warn("Corporation issuedShares is NaN: "+e.corp.issuedShares),console.warn("Converting to number now");const t=e.corp.issuedShares;isNaN(t)?e.corp.issuedShares=0:e.corp.issuedShares=t}e.corp.issuedShares-=t,e.player.loseMoney(t*a),Object(i.b)(e.popupId),e.rerender()}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium. However, repurchasing shares from the market tends to lead to an increase in stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"To purchase these shares, you must use your own money (NOT your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"The current buyback price of your company's stock is ",o.a.formatMoney(l),". Your company currently has ",o.a.formatBigNumber(e.corp.issuedShares)," outstanding stock shares."),r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):isNaN(t)||t<=0?r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to buyback"):t>e.corp.issuedShares?r.a.createElement(r.a.Fragment,null,"There are not this many shares available to buy back. There are only"," ",o.a.formatBigNumber(e.corp.issuedShares)," outstanding shares."):r.a.createElement(r.a.Fragment,null,"Purchase ",t," shares for a total of ",o.a.formatMoney(t*l))}),null),r.a.createElement("br",null),r.a.createElement("input",{autoFocus:!0,className:"text-input",type:"number",placeholder:"Shares to buyback",style:{margin:"5px"},onChange:function(e){""===e.target.value?a(null):a(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{onClick:c,className:"a-link-button",style:{display:"inline-block"}},"Buy shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(17),o=a(9),s=a(34),l=a(54);function c(e){const[t,a]=Object(n.useState)(null);function c(){if(null!==t){try{Object(l.g)(e.corp,t/100)}catch(e){Object(o.a)(e+"")}Object(i.b)(e.popupId)}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.",r.a.createElement("br",null),r.a.createElement("br",null),"In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an integer between 0 and ",s.a.DividendMaxPercentage,". (A percentage of 0 means no dividends will be issued",r.a.createElement("br",null),r.a.createElement("br",null),"Two important things to note:",r.a.createElement("br",null),"* Issuing dividends will negatively affect your corporation's stock price",r.a.createElement("br",null),"* Dividends are taxed. Taxes start at 50%, but can be decreased",r.a.createElement("br",null),r.a.createElement("br",null),"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes."),r.a.createElement("input",{autoFocus:!0,onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&c()},className:"text-input",placeholder:"Dividend %",type:"number",style:{margin:"5px"}}),r.a.createElement("button",{onClick:c,className:"std-button",style:{display:"inline-block"}},"Allocate Dividend Percentage"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(2),o=a(9),s=a(17),l=a(16),c=a(34);function u(e){if(null===e.shares)return r.a.createElement(r.a.Fragment,null);const t=Math.round(.9*e.corp.sharePrice),a=Math.round(.2*e.corp.totalShares),n=a-a%1e6;let o=e.shares;return isNaN(o)?r.a.createElement("p",null,"Invalid input"):(o/=1e7,o=1e7*Math.round(o),o<1e7?r.a.createElement("p",null,"Must issue at least 10 million new shares"):o>n?r.a.createElement("p",null,"You cannot issue that many shares"):r.a.createElement("p",null,"Issue $",i.a.format(o,"0.000a")," new shares for"," ",i.a.formatMoney(o*t),"?"))}function m(e){const[t,a]=Object(n.useState)(null),m=Math.round(.2*e.corp.totalShares),h=m-m%1e6;function p(){if(null===t)return;const a=Math.round(.9*e.corp.sharePrice);let n=t;if(isNaN(n))return void Object(o.a)("Invalid input for number of new shares");if(n=1e7*Math.round(n/1e7),n<1e7||n>h)return void Object(o.a)("Invalid input for number of new shares");const r=n*a;e.corp.issueNewSharesCooldown=c.a.IssueNewSharesCooldown,e.corp.totalShares+=n;let u=Object(l.a)(0,Math.round(n/2));u=1e6*Math.round(u/1e6),e.corp.issuedShares+=n-u,e.corp.funds=e.corp.funds.plus(r),e.corp.immediatelyUpdateSharePrice(),Object(s.b)(e.popupId),Object(o.a)(`Issued ${i.a.format(n,"0.000a")} and raised ${i.a.formatMoney(r)}. ${i.a.format(u,"0.000a")} of these shares were bought by private investors.

Stock price decreased to `+i.a.formatMoney(e.corp.sharePrice))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.",r.a.createElement("br",null),r.a.createElement("br",null)," * You can issue at most ",i.a.formatMoney(h)," new shares",r.a.createElement("br",null)," * New shares are sold at a 10% discount",r.a.createElement("br",null)," * You can only issue new shares once every 12 hours",r.a.createElement("br",null)," * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share",r.a.createElement("br",null)," * Number of new shares issued must be a multiple of 10 million",r.a.createElement("br",null),r.a.createElement("br",null),"When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares. If they choose to exercise this option, these newly issued shares become private, restricted shares, which means you cannot buy them back."),r.a.createElement(u,{corp:e.corp,shares:t}),r.a.createElement("input",{className:"text-input",autoFocus:!0,placeholder:"# New Shares",style:{margin:"5px"},onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&p()}}),r.a.createElement("button",{onClick:p,className:"std-button",style:{display:"inline-block"}},"Issue New Shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(17),o=a(2),s=a(34);function l(e){const t=e.corp.determineValuation();let a=0,n=4;switch(e.corp.fundingRound){case 0:a=.1,n=4;break;case 1:a=.35,n=3;break;case 2:a=.25,n=3;break;case 3:a=.2,n=2.5;break;default:return r.a.createElement(r.a.Fragment,null)}const l=t*a*n,c=Math.floor(s.a.INITIALSHARES*a);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"An investment firm has offered you ",o.a.formatMoney(l)," in funding in exchange for a"," ",o.a.format(100*a,"0.000a"),"% stake in the company (",o.a.format(c,"0.000a")," shares).",r.a.createElement("br",null),r.a.createElement("br",null),"Do you accept or reject this offer?",r.a.createElement("br",null),r.a.createElement("br",null),"Hint: Investment firms will offer more money if your corporation is turning a profit"),r.a.createElement("button",{onClick:function(){e.corp.fundingRound++,e.corp.addFunds(l),e.corp.numShares-=c,e.rerender(),Object(i.b)(e.popupId)},className:"std-button"},"Accept"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(9),o=a(17),s=a(2);function l(e){const[t,a]=Object(n.useState)(""),l=e.corp.determineValuation()/e.corp.totalShares;function c(){const a=parseFloat(t),n=e.corp.determineValuation()/e.corp.totalShares;isNaN(a)?Object(i.a)("Invalid value for number of issued shares"):a>e.corp.numShares?Object(i.a)("Error: You don't have that many shares to issue!"):(e.corp.public=!0,e.corp.sharePrice=n,e.corp.issuedShares=a,e.corp.numShares-=a,e.corp.addFunds(a*n),e.rerender(),Object(i.a)(`You took your ${e.corp.name} public and earned `+s.a.formatMoney(a*n)+" in your IPO"),Object(o.b)(e.popupId))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive ",s.a.formatMoney(l)," per share (the IPO money will be deposited directly into your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"You have a total of ",s.a.format(e.corp.numShares,"0.000a")," of shares that you can issue."),r.a.createElement("input",{className:"text-input",value:t,onChange:function(e){a(e.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{className:"std-button",onClick:c},"Go Public"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(442),o=a(922);const s={Cost:"Cost",Hacking:"Hacking Level",Strength:"Strength Level",Defense:"Defense Level",Dexterity:"Dexterity Level",Agility:"Agility Level",Charisma:"Charisma Level",AverageCombatStats:"Average Combat Stats",AverageAllStats:"Average Stats",TotalNumAugmentations:"Number of Augmentations"};function l(...e){let t=0;for(let a=0;ae.getCost()-t.getCost(),Hacking:(e,t)=>e.hacking_skill-t.hacking_skill,Strength:(e,t)=>e.strength-t.strength,Defense:(e,t)=>e.defense-t.defense,Dexterity:(e,t)=>e.dexterity-t.dexterity,Agility:(e,t)=>e.agility-t.agility,Charisma:(e,t)=>e.charisma-t.charisma,AverageCombatStats:(e,t)=>l(e.strength,e.defense,e.dexterity,e.agility)-l(t.strength,t.defense,t.dexterity,t.agility),AverageAllStats:(e,t)=>l(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-l(t.hacking_skill,t.strength,t.defense,t.dexterity,t.agility,t.charisma),TotalNumAugmentations:(e,t)=>e.augmentations.length-t.augmentations.length};function u(e){const[t,a]=Object(n.useState)(s.Cost);0===e.player.resleeves.length&&(e.player.resleeves=Object(i.a)());const l=c[t];if(void 0===l)throw new Error(`sort function '${t}' is undefined`);return e.player.resleeves.sort(l),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{style:{display:"block",width:"75%"}},"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!",r.a.createElement("br",null),r.a.createElement("br",null),"Re-sleeving will change your experience for every stat. It will also REMOVE all of your currently-installed Augmentations, and replace them with the ones provided by the purchased sleeve. However, Augmentations that you have purchased but not installed will NOT be removed. If you have purchased an Augmentation and then re-sleeve into a body which already has that Augmentation, it will be removed (since you cannot have duplicate Augmentations).",r.a.createElement("br",null),r.a.createElement("br",null),"NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File."),r.a.createElement("p",{style:{display:"inline-block"}},"Sort By: "),r.a.createElement("select",{className:"dropdown",defaultValue:t,onChange:function(e){a(e.target.value)}},Object.keys(s).map(e=>r.a.createElement("option",{key:e,value:e},s[e]))),e.player.resleeves.map((t,a)=>r.a.createElement(o.a,{key:a,player:e.player,resleeve:t})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(152),r=a(18),i=a(14);class o extends n.a{constructor(){super()}getCost(){const e=this.hacking_exp+this.strength_exp+this.defense_exp+this.dexterity_exp+this.agility_exp+this.charisma_exp;let t=0;for(let e=0;er.a.createElement("option",{key:e.name,value:e.name},e.name))),r.a.createElement("p",null,void 0!==u&&u.info)),r.a.createElement("div",{className:"resleeve-panel",style:{width:"20%"}},r.a.createElement("p",null,"It costs ",r.a.createElement(s.a,{money:m,player:e.player})," to purchase this Sleeve."),r.a.createElement("button",{className:"std-button",onClick:function(){Object(o.b)(e.resleeve,e.player)&&Object(c.a)(r.a.createElement(r.a.Fragment,null,"You re-sleeved for ",r.a.createElement(s.a,{money:m}),"!"))}},"Purchase")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(214),o=a(397),s=a(30),l=a(398),c=a(70),u=a(256),m=a(257),h=a(287),p=a(116),d=a(48),f=a(215),g=a(396),y=a(67),b=a(354),E=a(105),v=a(924),k=a(927),_=a(33);const C=Object(i.a)(e=>Object(o.a)({root:{width:50,padding:2,userSelect:"none"},pad:{padding:2}}));function w(e){const t=C(),[a,i]=Object(n.useState)(_.a.CodeInstructionRunTime),[o,w]=Object(n.useState)(_.a.MaxLogCapacity),[S,x]=Object(n.useState)(_.a.MaxPortCapacity),[O,T]=Object(n.useState)(_.a.MaxTerminalCapacity),[M,P]=Object(n.useState)(_.a.AutosaveInterval),[A,R]=Object(n.useState)(_.a.SuppressMessages),[N,I]=Object(n.useState)(_.a.SuppressFactionInvites),[j,F]=Object(n.useState)(_.a.SuppressTravelConfirmation),[D,B]=Object(n.useState)(_.a.SuppressBuyAugmentationConfirmation),[L,G]=Object(n.useState)(_.a.SuppressHospitalizationPopup),[W,H]=Object(n.useState)(_.a.SuppressBladeburnerPopup),[U,q]=Object(n.useState)(_.a.DisableHotkeys),[K,$]=Object(n.useState)(_.a.DisableASCIIArt),[z,Y]=Object(n.useState)(_.a.DisableTextEffects),[V,J]=Object(n.useState)(_.a.Locale),[Q,X]=Object(n.useState)(!1),[Z,ee]=Object(n.useState)(!1);return r.a.createElement("div",{className:t.root,style:{width:"90%"}},r.a.createElement(s.a,{variant:"h4",gutterBottom:!0},"Options"),r.a.createElement(c.a,{container:!0,spacing:3},r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(g.a,null,r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low can result in poor performance if you have many scripts running.")},r.a.createElement(s.a,null,"Netscript exec time (ms)")),r.a.createElement(l.a,{value:a,onChange:function(e,t){i(t),_.a.CodeInstructionRunTime=t},step:1,min:10,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a lot of memory if you have many scripts running.")},r.a.createElement(s.a,null,"Netscript log size")),r.a.createElement(l.a,{value:o,onChange:function(e,t){w(t),_.a.MaxLogCapacity=t},step:1,min:20,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to a port using Netscript's write() function. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Netscript port size")),r.a.createElement(l.a,{value:S,onChange:function(e,t){x(t),_.a.MaxPortCapacity=t},step:1,min:20,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to a the terminal. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Terminal capacity")),r.a.createElement(l.a,{value:O,onChange:function(e,t){T(t),_.a.MaxTerminalCapacity=t},step:50,min:50,max:500,valueLabelDisplay:"auto",marks:!0})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The time (in seconds) between each autosave. Set to 0 to disable autosave.")},r.a.createElement(s.a,null,"Autosave interval (s)")),r.a.createElement(l.a,{value:M,onChange:function(e,t){P(t),_.a.AutosaveInterval=t},step:30,min:0,max:600,valueLabelDisplay:"auto",marks:!0})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:A,onChange:function(e){R(e.target.checked),_.a.SuppressMessages=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then any messages you receive will not appear as popups on the screen. They will still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.")},r.a.createElement(s.a,null,"Suppress messages"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:N,onChange:function(e){I(e.target.checked),_.a.SuppressFactionInvites=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then any faction invites you receive will not appear as popups on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.")},r.a.createElement(s.a,null,"Suppress faction invites"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:j,onChange:function(e){F(e.target.checked),_.a.SuppressTravelConfirmation=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.")},r.a.createElement(s.a,null,"Suppress travel confirmations"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:D,onChange:function(e){B(e.target.checked),_.a.SuppressBuyAugmentationConfirmation=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the confirmation message before buying augmentation will not show up.")},r.a.createElement(s.a,null,"Suppress buy augmentation confirmation"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:L,onChange:function(e){G(e.target.checked),_.a.SuppressHospitalizationPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.")},r.a.createElement(s.a,null,"Suppress hospitalization popup"))})),!!e.player.bladeburner&&r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:W,onChange:function(e){H(e.target.checked),_.a.SuppressBladeburnerPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.")},r.a.createElement(s.a,null,"Suppress bladeburner popup"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:U,onChange:function(e){q(e.target.checked),_.a.DisableHotkeys=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,'If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal commands, hotkeys to navigate between different parts of the game, and the "Save and Close (Ctrl + b)" hotkey in the Text Editor.')},r.a.createElement(s.a,null,"Disable hotkeys"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:K,onChange:function(e){$(e.target.checked),_.a.DisableASCIIArt=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set all ASCII art will be disabled.")},r.a.createElement(s.a,null,"Disable ascii art"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{color:"primary",checked:z,onChange:function(e){Y(e.target.checked),_.a.DisableTextEffects=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.")},r.a.createElement(s.a,null,"Disable text effects"))})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Sets the locale for displaying numbers.")},r.a.createElement(s.a,null,"Locale ")),r.a.createElement(h.a,{value:V,onChange:function(e){J(e.target.value),_.a.Locale=e.target.value}},r.a.createElement(p.a,{value:"en"},"en"),r.a.createElement(p.a,{value:"bg"},"bg"),r.a.createElement(p.a,{value:"cs"},"cs"),r.a.createElement(p.a,{value:"da-dk"},"da-dk"),r.a.createElement(p.a,{value:"de"},"de"),r.a.createElement(p.a,{value:"en-au"},"en-au"),r.a.createElement(p.a,{value:"en-gb"},"en-gb"),r.a.createElement(p.a,{value:"es"},"es"),r.a.createElement(p.a,{value:"fr"},"fr"),r.a.createElement(p.a,{value:"hu"},"hu"),r.a.createElement(p.a,{value:"it"},"it"),r.a.createElement(p.a,{value:"lv"},"lv"),r.a.createElement(p.a,{value:"no"},"no"),r.a.createElement(p.a,{value:"pl"},"pl"),r.a.createElement(p.a,{value:"ru"},"ru")))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",target:"_blank"},r.a.createElement("input",{type:"hidden",name:"cmd",value:"_s-xclick"}),r.a.createElement("input",{type:"hidden",name:"encrypted",value:"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHUVL4U0+ogZsO1s97IAQyfck9SaoFlxVtqQhkb8752MkQJJvGu3ZQSQGcVC4hFDPk8prXqyq4BU/k/EliwoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----"}),r.a.createElement("input",{type:"image",src:"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif",name:"submit",alt:"PayPal - The safer, easier way to pay online!"}))),r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(f.a,null,r.a.createElement(d.a,{onClick:()=>e.save()},"Save Game"),r.a.createElement(d.a,{onClick:()=>ee(!0)},"Delete Game")),r.a.createElement(f.a,null,r.a.createElement(d.a,{onClick:()=>e.export()},"Export Game"),r.a.createElement(d.a,{onClick:()=>e.import()},"Import Game")),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. After using this, save the game and then reload the page. This is different then normal kill in that normal kill will tell the script to shut down while force kill just removes the references to it (and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill all running instance of all scripts.")},r.a.createElement(d.a,{onClick:()=>e.forceKill()},"Force kill all active scripts"))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Perform a soft reset. Resets everything as if you had just purchased an Augmentation.")},r.a.createElement(d.a,{onClick:()=>e.softReset()},"Soft Reset"))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If your save file is extremely big you can use this button to view a map of all the files on every server. Be careful there might be spoilers.")},r.a.createElement(d.a,{onClick:()=>X(!0)},"Diagnose files"))),r.a.createElement(f.a,null,r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/changelog.html",target:"_blank"},r.a.createElement(s.a,null,"Changelog")),r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"},r.a.createElement(s.a,null,"Documentation")),r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/changelog.html",target:"_blank"},r.a.createElement(s.a,null,"Changelog")),r.a.createElement(b.a,{href:"https://discord.gg/TFc3hKD",target:"_blank"},r.a.createElement(s.a,null,"Discord")),r.a.createElement(b.a,{href:"https://www.reddit.com/r/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Reddit"))))),r.a.createElement(v.a,{open:Q,onClose:()=>X(!1)}),r.a.createElement(k.a,{onConfirm:()=>{e.delete(),ee(!1)},open:Z,onClose:()=>ee(!1),confirmationText:"Really delete your game? (It's permanent!)"}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(27),o=a(443),s=a(2),l=a(1023),c=a(1024),u=a(92),m=a(1350),h=a(1351),p=a(179),d=a(30),f=a(286),g=a(155),y=a(156),b=a(157),E=a(72),v=a.n(E);function k(e){const t=i.b[e.ip];let a=0;for(const e of t.scripts)a+=e.code.length;for(const e of t.textFiles)a+=e.text.length;if(0===a)return r.a.createElement(r.a.Fragment,null);const n=[];for(const e of t.scripts)n.push({name:e.filename,size:e.code.length});for(const e of t.textFiles)n.push({name:e.fn,size:e.text.length});return n.sort((e,t)=>t.size-e.size),r.a.createElement(g.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(y.a,{expandIcon:r.a.createElement(v.a,null)},r.a.createElement(d.a,null,t.hostname," (",s.a.formatBigNumber(a),"b)")),r.a.createElement(b.a,null,r.a.createElement(m.a,{component:f.a},r.a.createElement(l.a,null,r.a.createElement(h.a,null,r.a.createElement(p.a,null,r.a.createElement(u.a,null,r.a.createElement(d.a,null,"Filename")),r.a.createElement(u.a,{align:"right"},r.a.createElement(d.a,null,"Size")))),r.a.createElement(c.a,null,n.map(e=>r.a.createElement(p.a,{key:e.name},r.a.createElement(u.a,{component:"th",scope:"row"},r.a.createElement(d.a,null,e.name)),r.a.createElement(u.a,{align:"right"},r.a.createElement(d.a,null,s.a.formatBigNumber(e.size),"b"))))))),r.a.createElement("ul",null)))}function _(e){const t=[];for(const e of Object.keys(i.b))t.push(e);return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,null,"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are."),t.map(e=>r.a.createElement(k,{key:e,ip:e}))))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(443),o=a(48),s=a(30);function l(e){return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,null,e.confirmationText),r.a.createElement(o.a,{onClick:()=>{e.onConfirm()}},"Confirm")))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(931);function o(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,150);return()=>clearInterval(e)},[]),r.a.createElement("div",{style:{width:"70%"}},r.a.createElement("h1",null,"Sleeves"),r.a.createElement("p",null,"Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.",r.a.createElement("br",null),r.a.createElement("br",null),"Sleeves can be used to perform different tasks synchronously.",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"}},"FAQ"),r.a.createElement("a",{className:"std-button",style:{display:"inline-block"},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves"},"Documentation"),r.a.createElement("ul",null,e.player.sleeves.map((t,n)=>r.a.createElement("li",{key:n},r.a.createElement(i.a,{rerender:a,player:e.player,sleeve:t})))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return C}));var n=a(0),r=a.n(n),i=a(56),o=a(5),s=a(60),l=a(2),c=a(9),u=a(140),m=a(17),h=a(932),p=a(933),d=a(934),f=a(11),g=a(167),y=a(377),b=a(935),E=a(936),v=a(937),k=a(938),_=a(124);function C(e){const[t,a]=Object(n.useState)(["------","------","------"]);let C=r.a.createElement(r.a.Fragment,null);switch(e.sleeve.currentTask){case i.a.Idle:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently idle");break;case i.a.Company:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working your job at ",e.sleeve.currentTaskLocation,".");break;case i.a.Faction:{let t="nothing";switch(e.sleeve.factionWorkType){case _.a.Field:t="Field work";break;case _.a.Hacking:t="Hacking contracts";break;case _.a.Security:t="Security work"}C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently doing ",t," for ",e.sleeve.currentTaskLocation,".");break}case i.a.Crime:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently attempting to ",s.a[e.sleeve.crimeType].type," (Success Rate:"," ",l.a.formatPercentage(s.a[e.sleeve.crimeType].successRate(e.sleeve)),").");break;case i.a.Class:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently studying/taking a course at ",e.sleeve.currentTaskLocation,".");break;case i.a.Gym:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working out at ",e.sleeve.currentTaskLocation,".");break;case i.a.Recovery:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.");break;case i.a.Synchro:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.");break;default:console.error("Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): "+t[0])}let w=[];if(e.sleeve.currentTask===i.a.Crime)w=[["Money",r.a.createElement(f.a,{money:parseFloat(e.sleeve.currentTaskLocation)}),"(on success)"],["Hacking Exp",l.a.formatExp(e.sleeve.gainRatesForTask.hack),"(2x on success)"],["Strength Exp",l.a.formatExp(e.sleeve.gainRatesForTask.str),"(2x on success)"],["Defense Exp",l.a.formatExp(e.sleeve.gainRatesForTask.def),"(2x on success)"],["Dexterity Exp",l.a.formatExp(e.sleeve.gainRatesForTask.dex),"(2x on success)"],["Agility Exp",l.a.formatExp(e.sleeve.gainRatesForTask.agi),"(2x on success)"],["Charisma Exp",l.a.formatExp(e.sleeve.gainRatesForTask.cha),"(2x on success)"]];else if(w=[["Money:",Object(g.a)(5*e.sleeve.gainRatesForTask.money)],["Hacking Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.hack)+" / s"],["Strength Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.str)+" / s"],["Defense Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.def)+" / s"],["Dexterity Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.dex)+" / s"],["Agility Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.agi)+" / s"],["Charisma Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.cha)+" / s"]],e.sleeve.currentTask===i.a.Company||e.sleeve.currentTask===i.a.Faction){const t=e.sleeve.getRepGain(e.player);w.push(["Reputation:",Object(y.a)(5*t)])}return r.a.createElement("div",{className:"sleeve-elem"},r.a.createElement("div",{className:"sleeve-panel",style:{width:"25%"}},r.a.createElement("div",{className:"sleeve-stats-text"},r.a.createElement(b.a,{sleeve:e.sleeve}),r.a.createElement("button",{className:"std-button",onClick:function(){Object(c.a)(r.a.createElement(E.a,{sleeve:e.sleeve}))}},"More Stats"),r.a.createElement("button",{className:"std-button"+(e.player.money.lt(o.a.TravelCost)?" tooltip":""),onClick:function(){Object(m.a)("sleeve-travel-popup",p.a,{popupId:"sleeve-travel-popup",sleeve:e.sleeve,player:e.player,rerender:e.rerender})},disabled:e.player.money.lt(o.a.TravelCost)},"Travel",e.player.money.lt(o.a.TravelCost)&&r.a.createElement("span",{className:"tooltiptext"},"Not enough money")),r.a.createElement("button",{className:"std-button"+(e.sleeve.shock<100?" tooltip":""),onClick:function(){Object(m.a)("sleeve-augmentation-popup",h.a,{sleeve:e.sleeve,player:e.player})},style:{display:"block"},disabled:e.sleeve.shock<100},"Manage Augmentations",e.sleeve.shock<100&&r.a.createElement("span",{className:"tooltiptext"},"Unlocked when sleeve has fully recovered")))),r.a.createElement("div",{className:"sleeve-panel",style:{width:"40%"}},r.a.createElement(k.a,{player:e.player,sleeve:e.sleeve,setABC:a}),r.a.createElement("p",null,C),r.a.createElement("p",null,e.sleeve.currentTask===i.a.Crime&&Object(u.a)({progress:e.sleeve.currentTaskTime/e.sleeve.currentTaskMaxTime,totalTicks:25})),r.a.createElement("button",{className:"std-button",onClick:function(){switch(e.sleeve.resetTaskStatus(),t[0]){case"------":break;case"Work for Company":e.sleeve.workForCompany(e.player,t[1]);break;case"Work for Faction":e.sleeve.workForFaction(e.player,t[1],t[2]);break;case"Commit Crime":e.sleeve.commitCrime(e.player,t[1]);break;case"Take University Course":e.sleeve.takeUniversityCourse(e.player,t[2],t[1]);break;case"Workout at Gym":e.sleeve.workoutAtGym(e.player,t[2],t[1]);break;case"Shock Recovery":e.sleeve.shockRecovery(e.player);break;case"Synchronize":e.sleeve.synchronize(e.player);break;default:console.error("Invalid/Unrecognized taskValue in setSleeveTask(): "+t[0])}e.rerender()}},"Set Task")),r.a.createElement("div",{className:"sleeve-panel",style:{width:"35%"}},r.a.createElement(d.a,{title:"Earnings (Pre-Synchronization)",stats:w}),r.a.createElement("button",{className:"std-button",onClick:function(){Object(c.a)(r.a.createElement(v.a,{sleeve:e.sleeve}))}},"More Earnings Info")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(424),o=a(18),s=a(11),l=a(393);function c(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,150);return()=>clearInterval(e)},[]);const c=e.sleeve.augmentations.map(e=>e.name),u=Object(i.a)(e.sleeve,e.player);return r.a.createElement("div",{className:"noselect"},r.a.createElement("p",{style:{display:"block"}},"Owned Augmentations:"),r.a.createElement("div",{style:{width:"70%"}},c.map(e=>{const t=o.a[e];let a=t.info;return"string"!=typeof a&&(a=Object(l.renderToStaticMarkup)(a)),a+="

",a+=Object(l.renderToStaticMarkup)(t.stats),r.a.createElement("div",{key:e,className:"gang-owned-upgrade tooltip"},e,r.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:a}}))})),r.a.createElement("p",null,"You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they would for you. You can only purchase Augmentations that you have unlocked through Factions.",r.a.createElement("br",null),r.a.createElement("br",null),"When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the Duplicate Sleeve will immediately lose all of its stat experience."),u.map(t=>{let n=t.info;return"string"!=typeof n&&(n=Object(l.renderToStaticMarkup)(n)),n+="

",n+=Object(l.renderToStaticMarkup)(t.stats),r.a.createElement("div",{key:t.name,className:"cmpy-mgmt-upgrade-div",onClick:()=>function(t){e.sleeve.tryBuyAugmentation(e.player,t),a()}(t)},r.a.createElement("div",{style:{fontSize:"12px",padding:"2px"}},r.a.createElement("h2",null,t.name),r.a.createElement("br",null),"Cost: ",r.a.createElement(s.a,{money:t.startingCost,player:e.player}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("span",{dangerouslySetInnerHTML:{__html:n}})))}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(5),o=a(17),s=a(11),l=a(334),c=a(9);function u(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. Traveling to a different city costs ",r.a.createElement(s.a,{money:i.a.TravelCost,player:e.player}),". It will also set your current sleeve task to idle."),r.a.createElement(l.a,{currentCity:e.sleeve.city,onTravel:t=>function(t){e.player.canAfford(i.a.TravelCost)||Object(c.a)("You cannot afford to have this sleeve travel to another city"),e.sleeve.city=t,e.player.loseMoney(i.a.TravelCost),e.sleeve.resetTaskStatus(),Object(o.b)(e.popupId),e.rerender()}(t)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);function r(e){return n.createElement(n.Fragment,null,n.createElement("pre",null,e.title),n.createElement("table",null,n.createElement("tbody",null,e.stats.map((e,t)=>n.createElement("tr",{key:t},e.map((e,t)=>{let a={};return 0!==t&&(a={textAlign:"right"}),n.createElement("td",{style:a,key:t},e)}))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(0);function i(e){let t={};return t={textAlign:"right"},r.createElement(r.Fragment,null,r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{className:"character-hp-cell"},"HP: "),r.createElement("td",{className:"character-hp-cell",style:t},n.a.formatHp(e.sleeve.hp)," / ",n.a.formatHp(e.sleeve.max_hp))),r.createElement("tr",null,r.createElement("td",null,"City: "),r.createElement("td",{style:t},e.sleeve.city)),r.createElement("tr",null,r.createElement("td",{className:"character-hack-cell"},"Hacking: "),r.createElement("td",{className:"character-hack-cell",style:t},n.a.formatSkill(e.sleeve.hacking_skill))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Strength: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.strength))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Defense: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.defense))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Dexterity: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.dexterity))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Agility: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.agility))),r.createElement("tr",null,r.createElement("td",{className:"character-cha-cell"},"Charisma: "),r.createElement("td",{className:"character-cha-cell",style:t},n.a.formatSkill(e.sleeve.charisma))),r.createElement("tr",null,r.createElement("td",{className:"character-int-cell"},"Shock: "),r.createElement("td",{className:"character-int-cell",style:t},n.a.formatSleeveShock(100-e.sleeve.shock))),r.createElement("tr",null,r.createElement("td",{className:"character-int-cell"},"Sync: "),r.createElement("td",{className:"character-int-cell",style:t},n.a.formatSleeveSynchro(e.sleeve.sync))),r.createElement("tr",null,r.createElement("td",{className:"character-int-cell"},"Memory: "),r.createElement("td",{className:"character-int-cell",style:t},n.a.formatSleeveMemory(e.sleeve.memory))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(2),r=a(184),i=a(0);function o(e){return i.createElement(i.Fragment,null,Object(r.a)([["Hacking: ",e.sleeve.hacking_skill,`(${n.a.formatExp(e.sleeve.hacking_exp)} exp)`],["Strength: ",e.sleeve.strength,`(${n.a.formatExp(e.sleeve.strength_exp)} exp)`],["Defense: ",e.sleeve.defense,`(${n.a.formatExp(e.sleeve.defense_exp)} exp)`],["Dexterity: ",e.sleeve.dexterity,`(${n.a.formatExp(e.sleeve.dexterity_exp)} exp)`],["Agility: ",e.sleeve.agility,`(${n.a.formatExp(e.sleeve.agility_exp)} exp)`],["Charisma: ",e.sleeve.charisma,`(${n.a.formatExp(e.sleeve.charisma_exp)} exp)`]],"Stats:"),i.createElement("br",null),Object(r.a)([["Hacking Level multiplier: ",n.a.formatPercentage(e.sleeve.hacking_mult)],["Hacking Experience multiplier: ",n.a.formatPercentage(e.sleeve.hacking_exp_mult)],["Strength Level multiplier: ",n.a.formatPercentage(e.sleeve.strength_mult)],["Strength Experience multiplier: ",n.a.formatPercentage(e.sleeve.strength_exp_mult)],["Defense Level multiplier: ",n.a.formatPercentage(e.sleeve.defense_mult)],["Defense Experience multiplier: ",n.a.formatPercentage(e.sleeve.defense_exp_mult)],["Dexterity Level multiplier: ",n.a.formatPercentage(e.sleeve.dexterity_mult)],["Dexterity Experience multiplier: ",n.a.formatPercentage(e.sleeve.dexterity_exp_mult)],["Agility Level multiplier: ",n.a.formatPercentage(e.sleeve.agility_mult)],["Agility Experience multiplier: ",n.a.formatPercentage(e.sleeve.agility_exp_mult)],["Charisma Level multiplier: ",n.a.formatPercentage(e.sleeve.charisma_mult)],["Charisma Experience multiplier: ",n.a.formatPercentage(e.sleeve.charisma_exp_mult)],["Faction Reputation Gain multiplier: ",n.a.formatPercentage(e.sleeve.faction_rep_mult)],["Company Reputation Gain multiplier: ",n.a.formatPercentage(e.sleeve.company_rep_mult)],["Salary multiplier: ",n.a.formatPercentage(e.sleeve.work_money_mult)],["Crime Money multiplier: ",n.a.formatPercentage(e.sleeve.crime_money_mult)],["Crime Success multiplier: ",n.a.formatPercentage(e.sleeve.crime_success_mult)]],"Multipliers:"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(2),r=a(11),i=a(0),o=a(184);function s(e){return i.createElement(i.Fragment,null,Object(o.a)([["Money ",i.createElement(r.a,{money:e.sleeve.earningsForTask.money})],["Hacking Exp ",n.a.formatExp(e.sleeve.earningsForTask.hack)],["Strength Exp ",n.a.formatExp(e.sleeve.earningsForTask.str)],["Defense Exp ",n.a.formatExp(e.sleeve.earningsForTask.def)],["Dexterity Exp ",n.a.formatExp(e.sleeve.earningsForTask.dex)],["Agility Exp ",n.a.formatExp(e.sleeve.earningsForTask.agi)],["Charisma Exp ",n.a.formatExp(e.sleeve.earningsForTask.cha)]],"Earnings for Current Task:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.sleeve.earningsForPlayer.money})],["Hacking Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.hack)],["Strength Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.str)],["Defense Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.def)],["Dexterity Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.dex)],["Agility Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.agi)],["Charisma Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.cha)]],"Total Earnings for Host Consciousness:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.sleeve.earningsForSleeves.money})],["Hacking Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.hack)],["Strength Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.str)],["Defense Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.def)],["Dexterity Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.dex)],["Agility Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.agi)],["Charisma Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.cha)]],"Total Earnings for Other Sleeves:"),i.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(56),o=a(60),s=a(7),l=a(21),c=a(24),u=a(124);const m=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],h=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function p(e,t){const a=[];for(const n of e.sleeves)t!==n&&n.currentTask===i.a.Company&&a.push(n.currentTaskLocation);const n=Object.keys(e.jobs);for(let e=0;e({first:["------"],second:()=>["------"]}),"Work for Company":(e,t)=>{let a=p(e,t);return 0===a.length&&(a=["------"]),{first:a,second:()=>["------"]}},"Work for Faction":(e,t)=>{let a=d(e,t);return 0===a.length&&(a=["------"]),{first:a,second:e=>{const t=c.a[e].getInfo(),a=[];return t.offerHackingWork&&a.push("Hacking Contracts"),t.offerFieldWork&&a.push("Field Work"),t.offerSecurityWork&&a.push("Security Work"),a}}},"Commit Crime":()=>({first:Object.keys(o.a),second:()=>["------"]}),"Take University Course":(e,t)=>{let a=[];switch(t.city){case l.a.Aevum:a=[s.a.AevumSummitUniversity];break;case l.a.Sector12:a=[s.a.Sector12RothmanUniversity];break;case l.a.Volhaven:a=[s.a.VolhavenZBInstituteOfTechnology];break;default:a=["No university available in city!"]}return{first:m,second:()=>a}},"Workout at Gym":(e,t)=>{let a=[];switch(t.city){case l.a.Aevum:a=[s.a.AevumCrushFitnessGym,s.a.AevumSnapFitnessGym];break;case l.a.Sector12:a=[s.a.Sector12IronGym,s.a.Sector12PowerhouseGym];break;case l.a.Volhaven:a=[s.a.VolhavenMilleniumFitnessGym];break;default:a=["No gym available in city!"]}return{first:h,second:()=>a}},"Shock Recovery":()=>({first:["------"],second:()=>["------"]}),Synchronize:()=>({first:["------"],second:()=>["------"]})},g={"------":()=>!0,"Work for Company":(e,t)=>p(e,t).length>0,"Work for Faction":(e,t)=>d(e,t).length>0,"Commit Crime":()=>!0,"Take University Course":(e,t)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(t.city),"Workout at Gym":(e,t)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(t.city),"Shock Recovery":(e,t)=>t.shock<100,Synchronize:(e,t)=>t.sync<100};function y(e){const t=function(e){switch(e.currentTask){case i.a.Idle:return["------","------","------"];case i.a.Company:return["Work for Company",e.currentTaskLocation,"------"];case i.a.Faction:{let t="";switch(e.factionWorkType){case u.a.Hacking:t="Hacking Contracts";break;case u.a.Field:t="Field Work";break;case u.a.Security:t="Security Work"}return["Work for Faction",e.currentTaskLocation,t]}case i.a.Crime:return["Commit Crime",e.crimeType,"------"];case i.a.Class:return["Take University Course",e.className,e.currentTaskLocation];case i.a.Gym:return["Workout at Gym",e.gymStatType,e.currentTaskLocation];case i.a.Recovery:return["Shock Recovery","------","------"];case i.a.Synchro:return["Synchronize","------","------"]}}(e.sleeve),[a,o]=Object(n.useState)(t[0]),[s,l]=Object(n.useState)(t[1]),[c,m]=Object(n.useState)(t[2]),h=Object.keys(g).filter(t=>g[t](e.player,e.sleeve)),p=f[a];if(void 0===p)throw new Error(`No function for task '${a}'`);const d=p(e.player,e.sleeve),y=d.second(s);return d.first.length>0&&!d.first.includes(s)&&(l(d.first[0]),e.setABC([a,d.first[0],c])),y.length>0&&!y.includes(c)&&(m(y[0]),e.setABC([a,s,y[0]])),r.a.createElement(r.a.Fragment,null,r.a.createElement("select",{className:"dropdown",onChange:function(t){const n=t.target.value,r=f[n];if(void 0===r)throw new Error(`No function for task '${a}'`);const i=r(e.player,e.sleeve),s=i.second(i.first[0]);m(s[0]),l(i.first[0]),o(n),e.setABC([n,i.first[0],s[0]])},defaultValue:a},h.map(e=>r.a.createElement("option",{key:e,value:e},e))),!(1===d.first.length&&"------"===d.first[0])&&r.a.createElement("select",{className:"dropdown",onChange:function(t){l(t.target.value),e.setABC([a,t.target.value,c])},defaultValue:s},d.first.map(e=>r.a.createElement("option",{key:e,value:e},e))),!(1===y.length&&"------"===y[0])&&r.a.createElement("select",{className:"dropdown",onChange:function(t){m(t.target.value),e.setABC([a,s,t.target.value])},defaultValue:c},y.map(e=>r.a.createElement("option",{key:e,value:e},e))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(46),r=a(940),i=a(0),o=a(52);let s;function l(e,t,a,l,c){if(!n.b.isOn(n.a.Infiltration))return;const u=function(e,t){const a=e.strength+e.defense+e.dexterity+e.agility+e.charisma,n=t-Math.pow(a,.9)/250-e.intelligence/1600;return n<0?0:n>3?3:n}(t,l);o.render(i.createElement(r.a,{Engine:e,Player:t,Location:a,StartingDifficulty:l,Difficulty:u,MaxLevel:c}),s)}document.addEventListener("DOMContentLoaded",(function e(){const t=document.getElementById("infiltration-container");if(null===t)throw new Error("huh?");s=t,document.removeEventListener("DOMContentLoaded",e)}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(941),o=a(942);function s(e){const[t,a]=Object(n.useState)(!1);return t?r.a.createElement(o.a,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel}):r.a.createElement(i.a,{Player:e.Player,Engine:e.Engine,Location:e.Location,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel,start:()=>a(!0),cancel:function(){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(22),o=a(70);function s(e,t){let a="";return t<=0?t=0:t>13?t=13:(t--,a=">"),r.a.createElement("span",{style:{color:e}},"=".repeat(t),a," ".repeat(13-a.length-t))}function l(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{container:!0,spacing:3},r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("h1",null,"Infiltrating ",e.Location)),r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("h2",null,"Maximum level: ",e.MaxLevel)),r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("pre",null,"[",0===(t=e.Difficulty)?r.a.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.a.createElement(r.a.Fragment,null,s("white",13*t),s("orange",13*(t-1)),s("red",13*(t-2))),"]"),r.a.createElement("pre",null," ^ ^ ^ ^"),r.a.createElement("pre",null," Trivial Normal Hard Impossible")),r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("p",null,"Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation."),r.a.createElement("br",null),r.a.createElement("p",null,"The minigames you play are randomly selected. It might take you few tries to get used to them."),r.a.createElement("br",null),r.a.createElement("p",null,"No game require use of the mouse."),r.a.createElement("br",null),r.a.createElement("p",null,"Spacebar is the default action/confirm button."),r.a.createElement("br",null),r.a.createElement("p",null,"Everything that uses arrow can also use WASD"),r.a.createElement("br",null),r.a.createElement("p",null,"Sometimes the rest of the keyboard is used.")),r.a.createElement(o.a,{item:!0,xs:3},r.a.createElement(i.a,{onClick:e.start,text:"Start"})),r.a.createElement(o.a,{item:!0,xs:3},r.a.createElement(i.a,{onClick:e.cancel,text:"Cancel"}))));var t}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n,r=a(0),i=a.n(r),o=a(70),s=a(943),l=a(944),c=a(946),u=a(947),m=a(948),h=a(949),p=a(950),d=a(951),f=a(952),g=a(953);!function(e){e[e.Countdown=0]="Countdown",e[e.Minigame=1]="Minigame",e[e.Result=2]="Result",e[e.Sell=3]="Sell"}(n||(n={}));const y=[c.a,l.a,u.a,m.a,h.a,p.a,d.a,f.a];function b(e){const[t,a]=Object(r.useState)(1),[l,c]=Object(r.useState)(n.Countdown),[u,m]=Object(r.useState)(""),[h,p]=Object(r.useState)({lastGames:[-1,-1],id:Math.floor(Math.random()*y.length)});function d(){let e=h.lastGames[0];const t=[h.lastGames[0],h.lastGames[1],h.id];for(;t.includes(e);)e=Math.floor(Math.random()*y.length);return e}function f(){p({lastGames:[h.lastGames[1],h.id],id:d()})}function b(e){m(t=>{let a=t;return a+=e?"✓":"✗",a.length>15&&(a=a.slice(1)),a})}let E;switch(l){case n.Countdown:E=i.a.createElement(s.a,{onFinish:()=>c(n.Minigame)});break;case n.Minigame:{const r=y[h.id];E=i.a.createElement(r,{onSuccess:function(){b(!0),t===e.MaxLevel?c(n.Sell):(c(n.Countdown),a(t+1)),f()},onFailure:function(t){c(n.Countdown),b(!1);const a=null!=t&&t.automated?e.Player.hp:3*e.StartingDifficulty;if(e.Player.takeDamage(a)){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}f()},difficulty:e.Difficulty+t/50});break}case n.Sell:E=i.a.createElement(g.a,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel})}return i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{container:!0,spacing:3},i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement("h3",null,"Level: ",t," / ",e.MaxLevel),i.a.createElement((function(){return i.a.createElement("h4",null,i.a.createElement("span",{style:{color:"gray"}},u.slice(0,u.length-1)),u[u.length-1])}),null)),i.a.createElement(o.a,{item:!0,xs:12},E)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(70);function o(e){const[t,a]=Object(n.useState)(3);return Object(n.useEffect)(()=>{0!==t?setTimeout(()=>a(t-1),200):e.onFinish()}),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",null,"Get Ready!"),r.a.createElement("h1",null,t))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(193),c=a(145),u=a(444);const m={Trivial:{timer:8e3,min:2,max:3},Normal:{timer:6e3,min:4,max:5},Hard:{timer:4e3,min:4,max:6},Impossible:{timer:2500,min:7,max:7}};function h(e){const t={timer:0,min:0,max:0};Object(c.a)(m,e.difficulty,t);const a=t.timer,[h,p]=Object(n.useState)(""),[d]=Object(n.useState)(function(e){let t="";const a=Object(l.b)(e.min,e.max);for(let e=0;e":"":"]"}(t);a&&(!function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(d[d.length-h.length-1],a)?e.onFailure():d.length!==h.length+1?p(h+a):e.onSuccess())},onFailure:e.onFailure})))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(145);const c={Trivial:{window:600},Normal:{window:325},Hard:{window:250},Impossible:{window:150}};function u(e){const t={window:0};Object(l.a)(c,e.difficulty,t);const[a,u]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{let e=-1;const a=window.setTimeout(()=>{u(!1),e=window.setTimeout(()=>u(!0),t.window)},3250*Math.random()+1500);return()=>{clearInterval(a),-1!==e&&clearInterval(e)}},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:5e3,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Slash when his guard is down!"),r.a.createElement("p",{style:{fontSize:"5em"}},a?"!Guarding!":"!ATTACKING!"),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault(),32===t.keyCode&&(a?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(193),c=a(145),u=a(444);const m={Trivial:{timer:16e3,min:3,max:4},Normal:{timer:12500,min:2,max:3},Hard:{timer:15e3,min:3,max:4},Impossible:{timer:8e3,min:4,max:4}};function h(e){const t={timer:0,min:0,max:0};Object(c.a)(m,e.difficulty,t);const a=t.timer,[h]=Object(n.useState)(function(e){const t=Object(l.b)(e.min,e.max);let a="";for(let e=0;e0&&(a+=" "),a+=p[Math.floor(Math.random()*p.length)];return a}(t)),[d,f]=Object(n.useState)("");return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Type it backward"),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),16===t.keyCode)return;const a=d+t.key.toUpperCase();h.startsWith(a)?h===a?e.onSuccess():f(a):e.onFailure()},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement("p",{style:{transform:"scaleX(-1)"}},h)),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement("p",null,d,r.a.createElement(u.a,null))))}const p=["ALGORITHM","ANALOG","APP","APPLICATION","ARRAY","BACKUP","BANDWIDTH","BINARY","BIT","BITE","BITMAP","BLOG","BLOGGER","BOOKMARK","BOOT","BROADBAND","BROWSER","BUFFER","BUG","BUS","BYTE","CACHE","CAPS LOCK","CAPTCHA","CD","CD-ROM","CLIENT","CLIPBOARD","CLOUD","COMPUTING","COMMAND","COMPILE","COMPRESS","COMPUTER","CONFIGURE","COOKIE","COPY","CPU","CYBERCRIME","CYBERSPACE","DASHBOARD","DATA","MINING","DATABASE","DEBUG","DECOMPRESS","DELETE","DESKTOP","DEVELOPMENT","DIGITAL","DISK","DNS","DOCUMENT","DOMAIN","DOMAIN NAME","DOT","DOT MATRIX","DOWNLOAD","DRAG","DVD","DYNAMIC","EMAIL","EMOTICON","ENCRYPT","ENCRYPTION","ENTER","EXABYTE","FAQ","FILE","FINDER","FIREWALL","FIRMWARE","FLAMING","FLASH","FLASH DRIVE","FLOPPY DISK","FLOWCHART","FOLDER","FONT","FORMAT","FRAME","FREEWARE","GIGABYTE","GRAPHICS","HACK","HACKER","HARDWARE","HOME PAGE","HOST","HTML","HYPERLINK","HYPERTEXT","ICON","INBOX","INTEGER","INTERFACE","INTERNET","IP ADDRESS","ITERATION","JAVA","JOYSTICK","JUNKMAIL","KERNEL","KEY","KEYBOARD","KEYWORD","LAPTOP","LASER PRINTER","LINK","LINUX","LOG OUT","LOGIC","LOGIN","LURKING","MACINTOSH","MACRO","MAINFRAME","MALWARE","MEDIA","MEMORY","MIRROR","MODEM","MONITOR","MOTHERBOARD","MOUSE","MULTIMEDIA","NET","NETWORK","NODE","NOTEBOOK","COMPUTER","OFFLINE","ONLINE","OPENSOURCE","OPERATING","SYSTEM","OPTION","OUTPUT","PAGE","PASSWORD","PASTE","PATH","PHISHING","PIRACY","PIRATE","PLATFORM","PLUGIN","PODCAST","POPUP","PORTAL","PRINT","PRINTER","PRIVACY","PROCESS","PROGRAM","PROGRAMMER","PROTOCOL","QUEUE","QWERTY","RAM","REALTIME","REBOOT","RESOLUTION","RESTORE","ROM","ROOT","ROUTER","RUNTIME","SAVE","SCAN","SCANNER","SCREEN","SCREENSHOT","SCRIPT","SCROLL","SCROLL","SEARCH","ENGINE","SECURITY","SERVER","SHAREWARE","SHELL","SHIFT","SHIFT KEY","SNAPSHOT","SOCIAL NETWORKING","SOFTWARE","SPAM","SPAMMER","SPREADSHEET","SPYWARE","STATUS","STORAGE","SUPERCOMPUTER","SURF","SYNTAX","TABLE","TAG","TERMINAL","TEMPLATE","TERABYTE","TEXT EDITOR","THREAD","TOOLBAR","TRASH","TROJAN HORSE","TYPEFACE","UNDO","UNIX","UPLOAD","URL","USER","USER INTERFACE","USERNAME","UTILITY","VERSION","VIRTUAL","VIRTUAL MEMORY","VIRUS","WEB","WEBMASTER","WEBSITE","WIDGET","WIKI","WINDOW","WINDOWS","WIRELESS","PROCESSOR","WORKSTATION","WEB","WORM","WWW","XML","ZIP"]},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(145);const c={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};function u(e){const t={timer:0,size:0};Object(l.a)(c,e.difficulty,t);const a=t.timer,[u]=Object(n.useState)(function(e){const t=[];t.push(m[Math.floor(Math.random()*m.length)]);for(let a=0;a0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[a],e[a]=n}}(t),t}(t)),[p,d]=Object(n.useState)(0);return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",null,"Say something nice about the guard."),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=t.keyCode;if(32===a)return void(m.includes(u[p])?e.onSuccess():e.onFailure());let n=p;for([38,87,68,39].includes(a)&&n++,[65,37,83,40].includes(a)&&n--;n<0;)n+=u.length;for(;n>u.length-1;)n-=u.length;d(n)},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement("h2",{style:{fontSize:"2em"}},"↑"),r.a.createElement("h2",{style:{fontSize:"2em"}},u[p]),r.a.createElement("h2",{style:{fontSize:"2em"}},"↓")))}const m=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],h=["aggressive","aloof","arrogant","big-headed","boastful","boring","bossy","careless","clingy","couch potato","cruel","cynical","grumpy","hot air","know it all","obnoxious","pain in the neck","picky","tactless","thoughtless"]},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(193),c=a(145);const u={Trivial:{timer:13e3,min:6,max:8},Normal:{timer:7e3,min:7,max:8},Hard:{timer:5e3,min:8,max:9},Impossible:{timer:3e3,min:9,max:10}};function m(e){const t={timer:0,min:0,max:0};Object(c.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=["←","→","↑","↓"];let a="";for(let n=0;n=m.length&&e.onSuccess()):e.onFailure()},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(145),c=a(193);const u={Trivial:{timer:12500,width:3,height:3,symbols:6},Normal:{timer:15e3,width:4,height:4,symbols:7},Hard:{timer:12500,width:5,height:5,symbols:8},Impossible:{timer:1e4,width:6,height:6,symbols:9}};function m(e){const t={timer:0,width:0,height:0,symbols:0};Object(l.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=[];for(let a=0;at==d?r.a.createElement("span",{key:""+t,style:{fontSize:"1em",color:"blue"}},e," "):r.a.createElement("span",{key:""+t,style:{fontSize:"1em"}},e," "))),r.a.createElement("br",null),m.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("pre",null,e.map((e,a)=>a==g[0]&&t==g[1]?r.a.createElement("span",{key:`${a}${t}`,style:{fontSize:"2em",color:"blue"}},e," "):r.a.createElement("span",{key:`${a}${t}`,style:{fontSize:"2em"}},e," "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=[0,0];switch(Object(c.a)(t)){case"↑":a[1]--;break;case"←":a[0]--;break;case"↓":a[1]++;break;case"→":a[0]++}const n=[g[0]+a[0],g[1]+a[1]];if(n[0]=(n[0]+m[0].length)%m[0].length,n[1]=(n[1]+m.length)%m.length,y(n),32==t.keyCode){if(m[g[1]][g[0]]!==p[d])return void e.onFailure();f(d+1),p.length===d+1&&e.onSuccess()}},onFailure:e.onFailure})))}function h(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(70),o=a(143),s=a(144),l=a(145),c=a(193);const u={Trivial:{timer:15e3,width:3,height:3,mines:4},Normal:{timer:15e3,width:4,height:4,mines:7},Hard:{timer:15e3,width:5,height:5,mines:11},Impossible:{timer:15e3,width:6,height:6,mines:15}};function m(e){const t={timer:0,width:0,height:0,mines:0};Object(l.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=h(e);for(let a=0;a{const e=setTimeout(()=>b(!1),2e3);return()=>clearInterval(e)},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},y?"Remember all the mines!":"Mark all the mines!"),m.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("pre",null,e.map((e,a)=>y?m[t][a]?r.a.createElement("span",{key:a},"[?] "):r.a.createElement("span",{key:a},"[ ] "):a==f[0]&&t==f[1]?r.a.createElement("span",{key:a},"[X] "):p[t][a]?r.a.createElement("span",{key:a},"[.] "):r.a.createElement("span",{key:a},"[ ] "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),y)return;const a=[0,0];switch(Object(c.a)(t)){case"↑":a[1]--;break;case"←":a[0]--;break;case"↓":a[1]++;break;case"→":a[0]++}const n=[f[0]+a[0],f[1]+a[1]];if(n[0]=(n[0]+m[0].length)%m[0].length,n[1]=(n[1]+m.length)%m.length,g(n),32==t.keyCode){if(!m[f[1]][f[0]])return void e.onFailure();d(t=>(t[f[1]][f[0]]=!0,function(e,t){function a(e){return e.flat().reduce((e,t)=>e+(t?1:0),0)}return a(e)===a(t)}(m,t)&&e.onSuccess(),t))}},onFailure:e.onFailure})))}function h(e){const t=[];for(let a=0;ar.a.createElement("h3",{key:t},e.toString())),r.a.createElement("pre",null,new Array(p.length).fill(0).map((e,t)=>r.a.createElement("span",{key:t}," ",t+1,"    "))),new Array(8).fill(0).map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("pre",null,p.map((e,a)=>3!==t&&4!==t||!d[a]?r.a.createElement("span",{key:a,style:{color:e.colors[t%e.colors.length]}},"|",e.tpe,"|   "):r.a.createElement("span",{key:a},"      "))))),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=parseInt(t.key);a<1||a>p.length||isNaN(a)||y(t=>{const n=[...t];n[a-1]=!0,b.some(e=>e.shouldCut(p[a-1],a-1))||e.onFailure();const r=[];for(let e=0;ee===n[t])&&e.onSuccess(),n})},onFailure:e.onFailure})))}function f(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,a)=>t===a}}function g(e){const t=e[Math.floor(Math.random()*e.length)].colors[0];return{toString:()=>`Cut all wires colored ${p[t]}.`,shouldCut:e=>e.colors.includes(t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(24),r=a(0),i=a.n(r),o=a(22),s=a(70),l=a(11),c=a(75),u=a(6);function m(e){const[t,a]=Object(r.useState)("none");function m(){const t=document.getElementById("mainmenu-container");if(!t)throw new Error("mainmenu-container somehow null");t.style.visibility="visible",e.Engine.loadLocationContent()}const h=e.MaxLevel*Math.pow(1.01,e.MaxLevel),p=Math.pow(e.Difficulty+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*h*u.a.InfiltrationRep,d=Math.pow(e.Difficulty+1,2)*Math.pow(e.StartingDifficulty,3)*3e3*h*u.a.InfiltrationMoney;return i.a.createElement(i.a.Fragment,null,i.a.createElement(s.a,{container:!0,spacing:3},i.a.createElement(s.a,{item:!0,xs:10},i.a.createElement("h1",null,"Infiltration successful!")),i.a.createElement(s.a,{item:!0,xs:10},i.a.createElement("h2",null,"You can trade the confidential information you found for money or reputation."),i.a.createElement("select",{className:"dropdown",onChange:function(e){a(e.target.value)}},i.a.createElement("option",{key:"none",value:"none"},"none"),e.Player.factions.filter(e=>n.a[e].getInfo().offersWork()).map(e=>i.a.createElement("option",{key:e,value:e},e))),i.a.createElement(o.a,{onClick:function(){"none"!==t&&(n.a[t].playerReputation+=p,m())},text:i.a.createElement(i.a.Fragment,null,"Trade for ",Object(c.a)(p)," reputation")})),i.a.createElement(s.a,{item:!0,xs:3},i.a.createElement(o.a,{onClick:function(){e.Player.gainMoney(d),e.Player.recordMoneySource(d,"infiltration"),m()},text:i.a.createElement(i.a.Fragment,null,"Sell for ",i.a.createElement(l.a,{money:d}))})),i.a.createElement(s.a,{item:!0,xs:3},i.a.createElement(o.a,{onClick:m,text:"Quit"}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(955),o=a(956),s=a(957),l=a(241),c=a(958),u=a(960),m=a(961),h=a(962),p=a(28),d=a(45),f=a(27),g=a(90),y=a(17);function b(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[b,E]=Object(n.useState)(p.c.x1);Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]);let v,k=0;for(let t=0;tE(p.c.x1),()=>E(p.c.x5),()=>E(p.c.x10),()=>E(p.c.MAX)],C=e.player.hacknetNodes.map(t=>{if(Object(d.g)(e.player)){if(t instanceof l.a)throw new Error("node was hacknet node");const n=f.b[t];if(null==n)throw new Error("Could not find Hacknet Server object in AllServers map for IP: "+t);if(n instanceof g.a)throw new Error("node was normal server");return r.a.createElement(s.a,{player:e.player,key:n.hostname,node:n,purchaseMultiplier:b,rerender:a})}if("string"==typeof t)throw new Error("node was ip string");return r.a.createElement(o.a,{player:e.player,key:t.name,node:t,purchaseMultiplier:b,rerender:a})});return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"Hacknet ",Object(d.g)(e.player)?"Servers":"Nodes"),r.a.createElement(i.a,{hasHacknetServers:Object(d.g)(e.player)}),r.a.createElement(h.a,{cost:v,multiplier:b,onClick:function(){Object(d.l)(e.player),a()}}),r.a.createElement("br",null),r.a.createElement("div",{id:"hacknet-nodes-money-multipliers-div"},r.a.createElement(m.a,{totalProduction:k,player:e.player}),r.a.createElement(u.a,{onClicks:_,purchaseMultiplier:b})),Object(d.g)(e.player)&&r.a.createElement("button",{className:"std-button",onClick:function(){Object(y.a)("hacknet-server-hash-upgrades-popup",c.a,{player:e.player})},style:{display:"block"}},"Spend Hashes on Upgrades"),r.a.createElement("ul",{id:"hacknet-nodes-list"},C))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){return r.a.createElement("div",null,r.a.createElement("p",{className:"hacknet-general-info"},"The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to anonymously share computing power and perform distributed cyberattacks without the fear of being traced."),e.hasHacknetServers?r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"hacknet-general-info"},"Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers will perform computations and operations on the network, earning you hashes. Hashes can be spent on a variety of different upgrades."),r.a.createElement("p",{className:"hacknet-general-info"},"Hacknet Servers can also be used as servers to run scripts. However, running scripts on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash rate will be reduced by the percentage of RAM that is being used by that Server to run scripts.")):r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"hacknet-general-info"},"Here, you can purchase a Hacknet Node, a specialized machine that can connect and contribute its resources to the Hacknet network. This allows you to take a small percentage of profits from hacks performed on the network. Essentially, you are renting out your Node's computing power."),r.a.createElement("p",{className:"hacknet-general-info"},"Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node can be upgraded in order to increase its computing power and thereby increase the profit you earn from it.")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(28),o=a(45),s=a(11),l=a(167);function c(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let c,u,m,h,p,d;if(t.level>=i.a.MaxLevel)c=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),u="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.a.MaxLevel);else{const e=i.a.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);c=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),u=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.ram>=i.a.MaxRam)m=r.a.createElement(r.a.Fragment,null,"MAX RAM"),h="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.a.MaxRam);else{const e=Math.round(Math.log2(i.a.MaxRam/t.ram));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);m=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),h=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.cores>=i.a.MaxCores)p=r.a.createElement(r.a.Fragment,null,"MAX CORES"),d="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.a.MaxCores);else{const e=i.a.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);p=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),d=e.player.money.lt(l)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},t.name)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},r.a.createElement(s.a,{money:t.totalMoneyGenerated,player:e.player})," (",Object(l.a)(t.moneyGainRatePerSecond),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},t.level),r.a.createElement("button",{className:u,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.e)(e.player,t,i.a.MaxLevel)),Object(o.n)(e.player,t,r),n()}},c)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},t.ram,"GB"),r.a.createElement("button",{className:h,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.f)(e.player,t,i.a.MaxRam)),Object(o.o)(e.player,t,r),n()}},m)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},t.cores),r.a.createElement("button",{className:d,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.d)(e.player,t,i.a.MaxCores)),Object(o.k)(e.player,t,r),n()}},p))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(28),o=a(45),s=a(11),l=a(183),c=a(445);function u(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let u,m,h,p,d,f,g,y;if(t.level>=i.b.MaxLevel)u=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),m="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.b.MaxLevel);else{const e=i.b.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);u=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),m=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.maxRam>=i.b.MaxRam)h=r.a.createElement(r.a.Fragment,null,"MAX RAM"),p="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.b.MaxRam);else{const e=Math.round(Math.log2(i.b.MaxRam/t.maxRam));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);h=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),p=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.cores>=i.b.MaxCores)d=r.a.createElement(r.a.Fragment,null,"MAX CORES"),f="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.b.MaxCores);else{const e=i.b.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);d=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),f=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.cache>=i.b.MaxCache)g=r.a.createElement(r.a.Fragment,null,"MAX CACHE"),y="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.c)(e.player,t,i.b.MaxCache);else{const e=i.b.MaxCache-t.cache;n=Math.min(e,a)}const l=t.calculateCacheUpgradeCost(n);g=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),y=e.player.money.lt(l)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},t.hostname)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(l.a)(t.totalHashesGenerated)," (",Object(c.a)(t.hashRate),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Hash Capacity:"),r.a.createElement("span",{className:"text"},Object(l.a)(t.hashCapacity))),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},t.level),r.a.createElement("button",{className:m,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.e)(e.player,t,i.b.MaxLevel)),Object(o.n)(e.player,t,r),n()}},u)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},t.maxRam,"GB"),r.a.createElement("button",{className:p,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.f)(e.player,t,i.b.MaxRam)),Object(o.o)(e.player,t,r),n()}},h)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},t.cores),r.a.createElement("button",{className:f,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.d)(e.player,t,i.b.MaxCores)),Object(o.k)(e.player,t,r),n()}},d)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cache Level:"),r.a.createElement("span",{className:"text upgradable-info"},t.cache),r.a.createElement("button",{className:y,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.c)(e.player,t,i.b.MaxCache)),Object(o.j)(e.player,t,r),n(),Object(o.p)(e.player)}},g))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(273),o=a(210),s=a(183),l=a(959);function c(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]);const c=e.player.hashManager;if(!(c instanceof i.a))throw new Error("Player does not have a HashManager)");const u=Object.keys(o.a).map(t=>{const n=o.a[t];return r.a.createElement(l.a,{player:e.player,upg:n,hashManager:c,key:n.name,rerender:a})});return r.a.createElement("div",null,r.a.createElement("p",null,"Spend your hashes on a variety of different upgrades"),r.a.createElement("p",null,"Hashes: ",Object(s.a)(e.player.hashManager.hashes)),u)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(45),o=a(534),s=a(9),l=a(121),c=a(183);function u(e){const[t,a]=Object(n.useState)("ecorp");const u=e.hashManager,m=e.upg,h=u.getUpgradeCost(m.name),p=u.upgrades[m.name],d=m.effectText(p),f=u.hashes>=h?"std-button":"std-button-disabled";return r.a.createElement("div",{className:"bladeburner-action"},r.a.createElement(l.b,{value:m.name}),r.a.createElement("p",null,"Cost: ",Object(c.a)(h),", Bought: ",p," times"),r.a.createElement("p",null,m.desc),r.a.createElement("button",{className:f,onClick:function(){if(e.hashManager.hashes>=e.hashManager.getUpgradeCost(e.upg.name)){Object(i.m)(e.player,e.upg.name,t)||Object(s.a)("Failed to purchase upgrade. This may be because you do not have enough hashes, or because you do not have access to the feature upgrade affects."),e.rerender()}}},"Purchase"),p>0&&d&&r.a.createElement("p",null,d),m.hasTargetServer&&r.a.createElement(o.a,{serverType:o.b.Foreign,onChange:function(e){a(e.target.value)},style:{margin:"5px"}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(28);function o(e){return r.a.createElement("button",{className:e.className,onClick:e.onClick},e.text)}function s(e){if(null==e.purchaseMultiplier)throw new Error("MultiplierButtons constructed without required props");const t=["x1","x5","x10","MAX"],a=e.onClicks,n=[];for(let s=0;se?n.createElement("span",{key:e,className:"tooltip",style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:this.props.enterLocation.bind(this,e)},n.createElement("b",null,"X")):n.createElement("span",null,"*"),t=/[A-Z]/g,a={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25},r=n=>{const r=[],i=[];let o;for(;null!==(o=t.exec(n));)i.push(o);if(0===i.length)return r.push(n),r;for(let t=0;tn.createElement("li",{key:e},n.createElement(i.a,{onClick:this.props.enterLocation.bind(this,e),text:e})));return n.createElement("ul",null,e)}render(){return n.createElement(n.Fragment,null,r.a.DisableASCIIArt?this.listCity():this.asciiCity())}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a(965),i=a(967),o=a(968),s=a(969),l=a(970),c=a(972),u=a(978),m=a(980),h=a(981),p=a(40),d=a(33),f=a(51),g=a(35),y=a(22),b=a(989);class E extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"}}getLocationSpecificContent(){const e=[];return this.props.loc.types.includes(p.a.Company)&&e.push(n.createElement(r.a,{engine:this.props.engine,key:"companylocation",locName:this.props.loc.name,p:this.props.p})),this.props.loc.types.includes(p.a.Gym)&&e.push(n.createElement(i.a,{key:"gymlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.Hospital)&&e.push(n.createElement(o.a,{key:"hospitallocation",p:this.props.p})),this.props.loc.types.includes(p.a.Slums)&&e.push(n.createElement(s.a,{key:"slumslocation",p:this.props.p})),this.props.loc.types.includes(p.a.Special)&&e.push(n.createElement(l.a,{engine:this.props.engine,key:"speciallocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.TechVendor)&&e.push(n.createElement(c.a,{key:"techvendorlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.TravelAgency)&&e.push(n.createElement(u.a,{key:"travelagencylocation",p:this.props.p,travel:this.props.travel})),this.props.loc.types.includes(p.a.University)&&e.push(n.createElement(m.a,{key:"universitylocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.Casino)&&e.push(n.createElement(h.a,{key:"casinoLocation",p:this.props.p})),e}render(){const e=this.getLocationSpecificContent(),t=f.a.getIp(this.props.loc.name),a=Object(g.b)(t),r=null!==a&&Object(g.d)(a);return n.createElement("div",null,n.createElement(y.a,{onClick:this.props.returnToCity,style:this.btnStyle,text:"Return to World"}),n.createElement("h1",{className:"noselect"},r&&!d.a.DisableTextEffects?n.createElement(b.a,{content:this.props.loc.name}):this.props.loc.name),e)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a(213),i=a(328),o=a(47),s=a(261),l=a(64),c=a(23),u=a(22),m=a(75),h=a(337),p=a(17),d=a(966);function f(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const g={display:"block"};class y extends n.Component{constructor(e){if(super(e),f(this,"companyPosition",null),f(this,"jobTitle",null),this.btnStyle={display:"block"},this.quit=this.quit.bind(this),this.applyForAgentJob=this.applyForAgentJob.bind(this),this.applyForBusinessConsultantJob=this.applyForBusinessConsultantJob.bind(this),this.applyForBusinessJob=this.applyForBusinessJob.bind(this),this.applyForEmployeeJob=this.applyForEmployeeJob.bind(this),this.applyForItJob=this.applyForItJob.bind(this),this.applyForPartTimeEmployeeJob=this.applyForPartTimeEmployeeJob.bind(this),this.applyForPartTimeWaiterJob=this.applyForPartTimeWaiterJob.bind(this),this.applyForSecurityJob=this.applyForSecurityJob.bind(this),this.applyForSoftwareConsultantJob=this.applyForSoftwareConsultantJob.bind(this),this.applyForSoftwareJob=this.applyForSoftwareJob.bind(this),this.applyForWaiterJob=this.applyForWaiterJob.bind(this),this.startInfiltration=this.startInfiltration.bind(this),this.work=this.work.bind(this),this.location=i.a[e.locName],null==this.location)throw new Error("CompanyLocation component constructed with invalid location: "+e.locName);if(this.company=o.a[e.locName],null==this.company)throw new Error("CompanyLocation component constructed with invalid company: "+e.locName);this.state={employedHere:!1},this.props.p.location=e.locName,this.checkIfEmployedHere(!1)}applyForAgentJob(e){e.isTrusted&&(this.props.p.applyForAgentJob(),this.checkIfEmployedHere(!0))}applyForBusinessConsultantJob(e){e.isTrusted&&(this.props.p.applyForBusinessConsultantJob(),this.checkIfEmployedHere(!0))}applyForBusinessJob(e){e.isTrusted&&(this.props.p.applyForBusinessJob(),this.checkIfEmployedHere(!0))}applyForEmployeeJob(e){e.isTrusted&&(this.props.p.applyForEmployeeJob(),this.checkIfEmployedHere(!0))}applyForItJob(e){e.isTrusted&&(this.props.p.applyForItJob(),this.checkIfEmployedHere(!0))}applyForPartTimeEmployeeJob(e){e.isTrusted&&(this.props.p.applyForPartTimeEmployeeJob(),this.checkIfEmployedHere(!0))}applyForPartTimeWaiterJob(e){e.isTrusted&&(this.props.p.applyForPartTimeWaiterJob(),this.checkIfEmployedHere(!0))}applyForSecurityJob(e){e.isTrusted&&(this.props.p.applyForSecurityJob(),this.checkIfEmployedHere(!0))}applyForSoftwareConsultantJob(e){e.isTrusted&&(this.props.p.applyForSoftwareConsultantJob(),this.checkIfEmployedHere(!0))}applyForSoftwareJob(e){e.isTrusted&&(this.props.p.applyForSoftwareJob(),this.checkIfEmployedHere(!0))}applyForWaiterJob(e){e.isTrusted&&(this.props.p.applyForWaiterJob(),this.checkIfEmployedHere(!0))}checkIfEmployedHere(e=!1){this.jobTitle=this.props.p.jobs[this.props.locName],null!=this.jobTitle&&(this.companyPosition=l.a[this.jobTitle]),e&&this.setState({employedHere:null!=this.jobTitle})}startInfiltration(e){if(!e.isTrusted)return;const t=this.location;if(!t.infiltrationData)return void console.error(`trying to start infiltration at ${this.props.locName} but the infiltrationData is null`);this.props.engine.loadInfiltrationContent(this.props.locName,t.infiltrationData.startingSecurityLevel,t.infiltrationData.maxClearanceLevel);t.infiltrationData}work(e){if(!e.isTrusted)return;const t=this.companyPosition;t instanceof s.a&&(t.isPartTimeJob()||t.isSoftwareConsultantJob()||t.isBusinessConsultantJob()?this.props.p.startWorkPartTime(this.props.locName):this.props.p.startWork(this.props.locName))}quit(e){if(!e.isTrusted)return;Object(p.a)("quit-job-popup",d.a,{locName:this.props.locName,company:this.company,player:this.props.p,onQuit:()=>this.checkIfEmployedHere(!0),popupId:"quit-job-popup"})}render(){const e=null!=this.jobTitle,t=this.company.getFavorGain();return n.createElement("div",null,e&&n.createElement("div",null,n.createElement("p",null,"Job Title: ",this.jobTitle),n.createElement("br",null),n.createElement("p",{style:g},"-------------------------"),n.createElement("br",null),n.createElement("p",{className:"tooltip"},"Company reputation: ",Object(m.a)(this.company.playerReputation),n.createElement("span",{className:"tooltiptext"},"You will earn ",Object(h.a)(t[0])," company favor upon resetting after installing Augmentations")),n.createElement("br",null),n.createElement("br",null),n.createElement("p",{style:g},"-------------------------"),n.createElement("br",null),n.createElement("p",{className:"tooltip"},"Company Favor: ",Object(h.a)(this.company.favor),n.createElement("span",{className:"tooltiptext"},"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.")),n.createElement("br",null),n.createElement("br",null),n.createElement("p",{style:g},"-------------------------"),n.createElement("br",null),n.createElement(u.a,{onClick:this.work,text:"Work"}),"    ",n.createElement(u.a,{onClick:this.quit,text:"Quit"})),this.company.hasAgentPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.a[0]],onClick:this.applyForAgentJob,p:this.props.p,style:this.btnStyle,text:"Apply for Agent Job"}),this.company.hasBusinessConsultantPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.c[0]],onClick:this.applyForBusinessConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Consultant Job"}),this.company.hasBusinessPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.b[0]],onClick:this.applyForBusinessJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Job"}),this.company.hasEmployeePositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.e[1]],onClick:this.applyForEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be an Employee"}),this.company.hasEmployeePositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.g[1]],onClick:this.applyForPartTimeEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Employee"}),this.company.hasITPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.d[0]],onClick:this.applyForItJob,p:this.props.p,style:this.btnStyle,text:"Apply for IT Job"}),this.company.hasSecurityPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.h[2]],onClick:this.applyForSecurityJob,p:this.props.p,style:this.btnStyle,text:"Apply for Security Job"}),this.company.hasSoftwareConsultantPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.k[0]],onClick:this.applyForSoftwareConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Consultant Job"}),this.company.hasSoftwarePositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.j[0]],onClick:this.applyForSoftwareJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Job"}),this.company.hasWaiterPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.e[0]],onClick:this.applyForWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a Waiter"}),this.company.hasWaiterPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.g[0]],onClick:this.applyForPartTimeWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Waiter"}),null!=this.location.infiltrationData&&n.createElement(u.a,{onClick:this.startInfiltration,style:this.btnStyle,text:"Infiltrate Company"}),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null),n.createElement("br",null))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(17);function o(e){return r.a.createElement(r.a.Fragment,null,"Would you like to quit your job at ",e.company.name,"?",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("button",{autoFocus:!0,className:"std-button",onClick:function(){e.player.quitJob(e.locName),e.onQuit(),Object(i.b)(e.popupId)}},"Quit"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(5),i=a(35),o=a(51),s=a(22),l=a(11);class c extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.trainStrength=this.trainStrength.bind(this),this.trainDefense=this.trainDefense.bind(this),this.trainDexterity=this.trainDexterity.bind(this),this.trainAgility=this.trainAgility.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=o.a.getIp(this.props.loc.name),t=Object(i.b)(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const a=t.backdoorInstalled?.9:1;return this.props.loc.costMult*a}train(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}trainStrength(){this.train(r.a.ClassGymStrength)}trainDefense(){this.train(r.a.ClassGymDefense)}trainDexterity(){this.train(r.a.ClassGymDexterity)}trainAgility(){this.train(r.a.ClassGymAgility)}render(){const e=r.a.ClassGymBaseCost*this.calculateCost();return n.createElement("div",null,n.createElement(s.a,{onClick:this.trainStrength,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Strength (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}),n.createElement(s.a,{onClick:this.trainDefense,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Defense (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}),n.createElement(s.a,{onClick:this.trainDexterity,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Dexterity (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}),n.createElement(s.a,{onClick:this.trainAgility,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Agility (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(292),i=a(138),o=a(11),s=a(9);class l extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.getCost=this.getCost.bind(this),this.getHealed=this.getHealed.bind(this),this.state={currHp:this.props.p.hp}}getCost(){return Object(r.b)(this.props.p)}getHealed(e){if(!e.isTrusted)return;if(this.props.p.hp<0&&(this.props.p.hp=0),this.props.p.hp>=this.props.p.max_hp)return;const t=this.getCost();this.props.p.loseMoney(t),this.props.p.hp=this.props.p.max_hp,this.props.p.recordMoneySource(-1*t,"hospitalization"),this.setState({currHp:this.props.p.hp}),Object(s.a)(n.createElement(n.Fragment,null,"You were healed to full health! The hospital billed you for ",n.createElement(o.a,{money:t})))}render(){const e=this.getCost();return n.createElement(i.a,{onClick:this.getHealed,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Get treatment for wounds - ",n.createElement(o.a,{money:e,player:this.props.p}))})}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(60),i=a(2),o=a(138);class s extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.shoplift=this.shoplift.bind(this),this.robStore=this.robStore.bind(this),this.mug=this.mug.bind(this),this.larceny=this.larceny.bind(this),this.dealDrugs=this.dealDrugs.bind(this),this.bondForgery=this.bondForgery.bind(this),this.traffickArms=this.traffickArms.bind(this),this.homicide=this.homicide.bind(this),this.grandTheftAuto=this.grandTheftAuto.bind(this),this.kidnap=this.kidnap.bind(this),this.assassinate=this.assassinate.bind(this),this.heist=this.heist.bind(this)}shoplift(e){e.isTrusted&&r.a.Shoplift.commit(this.props.p)}robStore(e){e.isTrusted&&r.a.RobStore.commit(this.props.p)}mug(e){e.isTrusted&&r.a.Mug.commit(this.props.p)}larceny(e){e.isTrusted&&r.a.Larceny.commit(this.props.p)}dealDrugs(e){e.isTrusted&&r.a.DealDrugs.commit(this.props.p)}bondForgery(e){e.isTrusted&&r.a.BondForgery.commit(this.props.p)}traffickArms(e){e.isTrusted&&r.a.TraffickArms.commit(this.props.p)}homicide(e){e.isTrusted&&r.a.Homicide.commit(this.props.p)}grandTheftAuto(e){e.isTrusted&&r.a.GrandTheftAuto.commit(this.props.p)}kidnap(e){e.isTrusted&&r.a.Kidnap.commit(this.props.p)}assassinate(e){e.isTrusted&&r.a.Assassination.commit(this.props.p)}heist(e){e.isTrusted&&r.a.Heist.commit(this.props.p)}render(){const e=r.a.Shoplift.successRate(this.props.p),t=r.a.RobStore.successRate(this.props.p),a=r.a.Mug.successRate(this.props.p),s=r.a.Larceny.successRate(this.props.p),l=r.a.DealDrugs.successRate(this.props.p),c=r.a.BondForgery.successRate(this.props.p),u=r.a.TraffickArms.successRate(this.props.p),m=r.a.Homicide.successRate(this.props.p),h=r.a.GrandTheftAuto.successRate(this.props.p),p=r.a.Kidnap.successRate(this.props.p),d=r.a.Assassination.successRate(this.props.p),f=r.a.Heist.successRate(this.props.p);return n.createElement("div",null,n.createElement(o.a,{intervalTime:5e3,onClick:this.shoplift,style:this.btnStyle,text:`Shoplift (${i.a.formatPercentage(e)} chance of success)`,tooltip:"Attempt to shoplift from a low-end retailer"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.robStore,style:this.btnStyle,text:`Rob store (${i.a.formatPercentage(t)} chance of success)`,tooltip:"Attempt to commit armed robbery on a high-end store"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.mug,style:this.btnStyle,text:`Mug someone (${i.a.formatPercentage(a)} chance of success)`,tooltip:"Attempt to mug a random person on the street"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.larceny,style:this.btnStyle,text:`Larceny (${i.a.formatPercentage(s)} chance of success)`,tooltip:"Attempt to rob property from someone's house"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.dealDrugs,style:this.btnStyle,text:`Deal Drugs (${i.a.formatPercentage(l)} chance of success)`,tooltip:"Attempt to deal drugs"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.bondForgery,style:this.btnStyle,text:`Bond Forgery (${i.a.formatPercentage(c)} chance of success)`,tooltip:"Attempt to forge corporate bonds"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.traffickArms,style:this.btnStyle,text:`Traffick illegal Arms (${i.a.formatPercentage(u)} chance of success)`,tooltip:"Attempt to smuggle illegal arms into the city"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.homicide,style:this.btnStyle,text:`Homicide (${i.a.formatPercentage(m)} chance of success)`,tooltip:"Attempt to murder a random person on the street"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.grandTheftAuto,style:this.btnStyle,text:`Grand theft Auto (${i.a.formatPercentage(h)} chance of success)`,tooltip:"Attempt to commit grand theft auto"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.kidnap,style:this.btnStyle,text:`Kidnap and Ransom (${i.a.formatPercentage(p)} chance of success)`,tooltip:"Attempt to kidnap and ransom a high-profile-target"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.assassinate,style:this.btnStyle,text:`Assassinate (${i.a.formatPercentage(d)} chance of success)`,tooltip:"Attempt to assassinate a high-profile target"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.heist,style:this.btnStyle,text:`Heist (${i.a.formatPercentage(f)} chance of success)`,tooltip:"Attempt to pull off the ultimate heist"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(971),i=a(17),o=a(7),s=a(138),l=a(22),c=a(9);class u extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.renderNoodleBar=this.renderNoodleBar.bind(this),this.createCorporationPopup=this.createCorporationPopup.bind(this),this.handleBladeburner=this.handleBladeburner.bind(this),this.handleResleeving=this.handleResleeving.bind(this),this.state={inBladeburner:this.props.p.inBladeburner()}}createCorporationPopup(){const e="create-start-corporation-popup";Object(i.a)(e,r.a,{player:this.props.p,popupId:e})}handleBladeburner(){const e=this.props.p;if(e.inBladeburner())this.props.engine.loadBladeburnerContent();else if(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100){e.startBladeburner({new:!0}),Object(c.a)("You have been accepted into the Bladeburner division!"),this.setState({inBladeburner:!0});const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else Object(c.a)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}handleResleeving(){this.props.engine.loadResleevingContent()}renderBladeburner(){if(!this.props.p.canAccessBladeburner())return null;const e=this.state.inBladeburner?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return n.createElement(l.a,{onClick:this.handleBladeburner,style:this.btnStyle,text:e})}renderNoodleBar(){return n.createElement(l.a,{onClick:function(){Object(c.a)(n.createElement(n.Fragment,null,"You ate some delicious noodles and feel refreshed."))},style:this.btnStyle,text:"Eat noodles"})}renderCreateCorporation(){return this.props.p.canAccessCorporation()?n.createElement(s.a,{disabled:!this.props.p.canAccessCorporation()||this.props.p.hasCorporation(),onClick:this.createCorporationPopup,style:this.btnStyle,text:"Create a Corporation"}):n.createElement(n.Fragment,null,n.createElement("p",null,n.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}renderResleeving(){return this.props.p.canAccessResleeving()?n.createElement(l.a,{onClick:this.handleResleeving,style:this.btnStyle,text:"Re-Sleeve"}):null}render(){switch(this.props.loc.name){case o.a.NewTokyoVitaLife:return this.renderResleeving();case o.a.Sector12CityHall:return this.renderCreateCorporation();case o.a.Sector12NSA:return this.renderBladeburner();case o.a.NewTokyoNoodleBar:return this.renderNoodleBar();default:console.error(`Location ${this.props.loc.name} doesn't have any special properties`)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(17),o=a(11),s=a(9);function l(e){if(!e.player.canAccessCorporation()||e.player.hasCorporation())return Object(i.b)(e.popupId),r.a.createElement(r.a.Fragment,null);const[t,a]=Object(n.useState)("");return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares",r.a.createElement("br",null),r.a.createElement("br",null),"If you would like to start one, please enter a name for your corporation below:"),r.a.createElement("input",{autoFocus:!0,className:"text-input",placeholder:"Corporation Name",onChange:function(e){a(e.target.value)},value:t}),r.a.createElement("button",{className:"std-button",onClick:function(){""!=t?(e.player.startCorporation(t,5e8),Object(s.a)("Congratulations! You just started your own corporation with government seed money. You can visit and manage your company in the City."),Object(i.b)(e.popupId)):Object(s.a)("Invalid company name!")},disabled:""==t},"Use seed money"),r.a.createElement("button",{className:"std-button",onClick:function(){e.player.canAfford(15e10)?""!=t?(e.player.startCorporation(t),e.player.loseMoney(15e10),Object(s.a)("Congratulations! You just self-funded your own corporation. You can visit and manage your company in the City."),Object(i.b)(e.popupId)):Object(s.a)("Invalid company name!"):Object(s.a)("You don't have enough money to create a corporation! You need $150b.")},disabled:""==t||!e.player.canAfford(15e10)},"Self-Fund (",r.a.createElement(o.a,{money:15e10,player:e.player}),")"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(973),o=a(974),s=a(976),l=a(170),c=a(22),u=a(11),m=a(17),h=a(977);function p(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}function p(e,t,n){Object(m.a)("purchase-server-popup",h.a,{ram:e,cost:t,p:n,popupId:"purchase-server-popup",rerender:a})}Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]);const d={display:"block"},f=[];for(let t=e.loc.techVendorMinRam;t<=e.loc.techVendorMaxRam;t*=2){const a=Object(l.a)(t);f.push(r.a.createElement(c.a,{key:t,onClick:()=>p(t,a,e.p),style:d,text:r.a.createElement(r.a.Fragment,null,"Purchase ",t,"GB Server - ",r.a.createElement(u.a,{money:a,player:e.p})),disabled:!e.p.canAfford(a)}))}return r.a.createElement("div",null,f,r.a.createElement("br",null),r.a.createElement("p",{className:"noselect"},r.a.createElement("i",null,'"You can order bigger servers via scripts. We don\'t take custom order in person."')),r.a.createElement("br",null),r.a.createElement(o.a,{p:e.p,rerender:a}),r.a.createElement(i.a,{p:e.p,rerender:a}),r.a.createElement(s.a,{p:e.p,rerender:a}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(5),o=a(170),s=a(219),l=a(22),c=a(11),u=a(194);function m(e){const t={display:"block"},a=e.p.getHomeComputer();if(a.maxRam>=i.a.HomeComputerMaxRam)return r.a.createElement(s.a,{style:t,text:"Upgrade 'home' RAM - MAX"});const n=e.p.getUpgradeHomeRamCost();return r.a.createElement(l.a,{disabled:!e.p.canAfford(n),onClick:function(){Object(o.d)(e.p),e.rerender()},style:t,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' RAM (",a.maxRam,"GB -> ",2*a.maxRam,"GB) -"," ",r.a.createElement(c.a,{money:n,player:e.p})),tooltip:r.a.createElement(u.a,{tex:String.raw`\large{cost = 3.2 \times 10^3 \times 1.58^{log_2{(ram)}}}`})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(975),o=a(5),s=a(219),l=a(22),c=a(11);function u(e){const t={display:"block"};return e.p.hasTorRouter()?r.a.createElement(s.a,{style:t,text:"TOR Router - Purchased"}):r.a.createElement(l.a,{disabled:!e.p.canAfford(o.a.TorRouterCost),onClick:function(){Object(i.a)(e.p),e.rerender()},style:t,text:r.a.createElement(r.a.Fragment,null,"Purchase TOR router - ",r.a.createElement(c.a,{money:o.a.TorRouterCost,player:e.p}))})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(5),r=a(27),i=a(35),o=a(51),s=a(9);function l(e){if(e.hasTorRouter())return void Object(s.a)("You already have a TOR Router!");if(!e.canAfford(n.a.TorRouterCost))return void Object(s.a)("You cannot afford to purchase the TOR router!");e.loseMoney(n.a.TorRouterCost);const t=Object(i.h)({ip:Object(r.c)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(r.a)(t),o.a.addIp("Darkweb Server",t.ip),e.getHomeComputer().serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.getHomeComputer().ip),Object(s.a)("You have purchased a TOR router!
You now have access to the dark web from your home computer.
Use the scan/scan-analyze commands to search for the dark web connection.")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(219),o=a(22),s=a(11),l=a(194);function c(e){const t={display:"block"},a=e.p.getHomeComputer(),n=a.cpuCores>=8;if(n)return r.a.createElement(i.a,{style:t,text:"Upgrade 'home' cores - MAX"});const c=1e9*Math.pow(7.5,a.cpuCores);return r.a.createElement(o.a,{disabled:!e.p.canAfford(c),onClick:function(){n||e.p.canAfford(c)&&(e.p.loseMoney(c),a.cpuCores++,e.rerender())},style:t,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' cores (",a.cpuCores," -> ",a.cpuCores+1,") -"," ",r.a.createElement(s.a,{money:c,player:e.p})),tooltip:r.a.createElement(l.a,{tex:String.raw`\large{cost = 10^9 \times 7.5 ^{\text{cores}}}`})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(17),o=a(170),s=a(2),l=a(11),c=a(22);function u(e){const[t,a]=Object(n.useState)("");function u(){Object(o.e)(t,e.ram,e.cost,e.p),Object(i.b)(e.popupId)}return r.a.createElement(r.a.Fragment,null,"Would you like to purchase a new server with ",s.a.formatRAM(e.ram)," of RAM for"," ",r.a.createElement(l.a,{money:e.cost,player:e.p}),"?",r.a.createElement("br",null),r.a.createElement("br",null),"Please enter the server hostname below:",r.a.createElement("br",null),r.a.createElement("div",{className:"popup-box-input-div"},r.a.createElement("input",{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&u()},onChange:function(e){a(e.target.value)},className:"text-input noselect",type:"text",placeholder:"Unique Hostname"}),r.a.createElement(c.a,{onClick:u,text:"Purchase Server",disabled:!e.p.canAfford(e.cost)})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(21),i=a(979),o=a(5),s=a(33),l=a(22),c=a(17),u=a(11),m=a(334);function h(e,t,a){if(s.a.SuppressTravelConfirmation)return void a();Object(c.a)("travel-confirmation",i.a,{player:e,city:t,travel:a,popupId:"travel-confirmation"})}function p(e){return n.createElement("div",{className:"noselect"},n.createElement("p",null,"From here, you can travel to any other city! A ticket costs"," ",n.createElement(u.a,{money:o.a.TravelCost,player:e.p}),"."),n.createElement(m.a,{currentCity:e.p.city,onTravel:t=>h(e.p,t,()=>e.travel(t))}))}function d(e){return n.createElement("div",null,n.createElement("p",null,"From here, you can travel to any other city! A ticket costs"," ",n.createElement(u.a,{money:o.a.TravelCost,player:e.p}),"."),Object.values(r.a).filter(t=>t!=e.p.city).map(t=>{const a=Object.entries(r.a).find(e=>e[1]===t);if(void 0===a)throw new Error(`could not find key for city '${t}'`);return n.createElement(l.a,{key:t,onClick:()=>h(e.p,t,()=>e.travel(a[1])),style:{display:"block"},text:"Travel to "+t})}))}function f(e){return s.a.DisableASCIIArt?n.createElement(d,{p:e.p,travel:e.travel}):n.createElement(p,{p:e.p,travel:e.travel})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(5),o=a(11),s=a(17);function l(e){const t=i.a.TravelCost;return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Would you like to travel to ",e.city,"? The trip will cost ",r.a.createElement(o.a,{money:t,player:e.player}),"."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("button",{className:"std-button",onClick:function(){e.travel(),Object(s.b)(e.popupId)}},"Travel"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(5),i=a(35),o=a(51),s=a(22),l=a(11);class c extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.take=this.take.bind(this),this.study=this.study.bind(this),this.dataStructures=this.dataStructures.bind(this),this.networks=this.networks.bind(this),this.algorithms=this.algorithms.bind(this),this.management=this.management.bind(this),this.leadership=this.leadership.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=o.a.getIp(this.props.loc.name),t=Object(i.b)(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const a=t.backdoorInstalled?.9:1;return this.props.loc.costMult*a}take(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}study(){this.take(r.a.ClassStudyComputerScience)}dataStructures(){this.take(r.a.ClassDataStructures)}networks(){this.take(r.a.ClassNetworks)}algorithms(){this.take(r.a.ClassAlgorithms)}management(){this.take(r.a.ClassManagement)}leadership(){this.take(r.a.ClassLeadership)}render(){const e=this.calculateCost(),t=r.a.ClassDataStructuresBaseCost*e,a=r.a.ClassNetworksBaseCost*e,i=r.a.ClassAlgorithmsBaseCost*e,o=r.a.ClassManagementBaseCost*e,c=r.a.ClassLeadershipBaseCost*e;return n.createElement("div",null,n.createElement(s.a,{onClick:this.study,style:this.btnStyle,text:"Study Computer Science (free)",tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.dataStructures,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Data Structures course (",n.createElement(l.a,{money:t,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.networks,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Networks course (",n.createElement(l.a,{money:a,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.algorithms,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Algorithms course (",n.createElement(l.a,{money:i,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.management,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Management course (",n.createElement(l.a,{money:o,player:this.props.p})," / sec)"),tooltip:"Gain charisma experience!"}),n.createElement(s.a,{onClick:this.leadership,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Leadership course (",n.createElement(l.a,{money:c,player:this.props.p})," / sec)"),tooltip:"Gain charisma experience!"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n,r=a(0),i=a(982),o=a(986),s=a(987),l=a(988),c=a(22);!function(e){e.None="none",e.Coin="coin",e.Slots="slots",e.Roulette="roulette",e.Blackjack="blackjack"}(n||(n={}));class u extends r.Component{constructor(e){super(e),this.state={game:n.None},this.updateGame=this.updateGame.bind(this)}updateGame(e){this.setState({game:e})}renderGames(){return r.createElement(r.Fragment,null,r.createElement(c.a,{onClick:()=>this.updateGame(n.Coin),text:"Play coin flip"}),r.createElement("br",null),r.createElement(c.a,{onClick:()=>this.updateGame(n.Slots),text:"Play slots"}),r.createElement("br",null),r.createElement(c.a,{onClick:()=>this.updateGame(n.Roulette),text:"Play roulette"}),r.createElement("br",null),r.createElement(c.a,{onClick:()=>this.updateGame(n.Blackjack),text:"Play blackjack"}))}renderGame(){let e=null;switch(this.state.game){case n.Coin:e=r.createElement(o.a,{p:this.props.p});break;case n.Slots:e=r.createElement(l.a,{p:this.props.p});break;case n.Roulette:e=r.createElement(s.a,{p:this.props.p});break;case n.Blackjack:e=r.createElement(i.a,{p:this.props.p});break;case n.None:break;default:throw new Error("MissingCaseException: "+this.state.game)}return r.createElement(r.Fragment,null,r.createElement(c.a,{onClick:()=>this.updateGame(n.None),text:"Stop playing"}),e)}render(){return this.state.game===n.None?this.renderGames():this.renderGame()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(11),i=a(270),o=a(983),s=a(394),l=a(1357),c=a(535),u=a(985),m=a(468),h=a(536);function p(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var d;!function(e){e.Pending="",e.PlayerWon="You won!",e.PlayerWonByBlackjack="You Won! Blackjack!",e.DealerWon="You lost!",e.Tie="Push! (Tie)"}(d||(d={}));class f extends i.a{constructor(e){super(e),p(this,"canStartGame",()=>{const{p:e}=this.props,{bet:t}=this.state;return e.canAfford(t)}),p(this,"startGame",()=>{if(!this.canStartGame())return;this.props.p.loseMoney(this.state.bet);const e=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),t=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:e,dealerHand:t,gameInProgress:!0,result:d.Pending}),21===this.getTrueHandValue(e)?21===this.getTrueHandValue(t)?this.finishGame(d.Tie):this.finishGame(d.PlayerWonByBlackjack):21===this.getTrueHandValue(t)&&this.finishGame(d.DealerWon)}),p(this,"getHandValue",e=>{let t=[0];for(let a=0;a=10?t.map(e=>e+10):1===n?t.flatMap(e=>[e+1,e+11]):t.map(e=>e+n)}return t}),p(this,"getTrueHandValue",e=>{const t=this.getHandValue(e),a=t.filter(e=>e<=21);return a.length>0?(a.sort((e,t)=>e-t),a[a.length-1]):t[0]}),p(this,"getHandDisplayValues",e=>{const t=this.getHandValue(e);return this.isHandBusted(e)?[...new Set([t[0]])]:[...new Set(t.filter(e=>e<=21))]}),p(this,"isHandBusted",e=>this.getTrueHandValue(e)>21),p(this,"playerHit",e=>{if(!e.isTrusted)return;const t=this.state.playerHand.addCards(this.deck.safeDrawCard());this.setState({playerHand:t}),this.isHandBusted(t)&&this.finishGame(d.DealerWon)}),p(this,"playerStay",e=>{if(!e.isTrusted)return;let t=this.state.dealerHand;for(;;){if(!(this.getTrueHandValue(t)<=16))break;t=t.addCards(this.deck.safeDrawCard())}if(this.setState({dealerHand:t}),this.isHandBusted(t))this.finishGame(d.PlayerWon);else{const e=this.getTrueHandValue(t),a=this.getTrueHandValue(this.state.playerHand);if(e>21||a>21)throw new Error("Someone busted when not expected to");a>e?this.finishGame(d.PlayerWon):a{let t=0;this.isPlayerWinResult(e)?(t=this.state.bet,this.win(this.props.p,2*t)):e===d.DealerWon?(t=-1*this.state.bet,this.win(this.props.p,-this.state.bet)):e===d.Tie&&this.win(this.props.p,this.state.bet),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t})}),p(this,"isPlayerWinResult",e=>e===d.PlayerWon||e===d.PlayerWonByBlackjack),p(this,"wagerOnChange",e=>{const{p:t}=this.props,a=e.target.value,n=Math.round(parseFloat(a));isNaN(n)?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not a valid number"}):n<=0?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Must bet a postive amount"}):n>1e8?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Exceeds max bet"}):t.canAfford(n)?this.setState({bet:n,betInput:a,wagerInvalid:!1,wagerInvalidHelperText:"",result:d.Pending}):this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),p(this,"startOnClick",e=>{e.isTrusted&&(this.state.wagerInvalid||this.startGame())}),this.deck=new o.a(5);this.state={playerHand:new s.a([]),dealerHand:new s.a([]),bet:1e6,betInput:String(1e6),gameInProgress:!1,result:d.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:e,playerHand:t,dealerHand:a,gameInProgress:i,result:o,wagerInvalid:s,wagerInvalidHelperText:p,gains:f}=this.state,g=this.getHandDisplayValues(t),y=this.getHandDisplayValues(a);return n.createElement("div",null,n.createElement("div",null,n.createElement(u.a,{value:e,label:n.createElement(n.Fragment,null,"Wager (Max: ",n.createElement(r.a,{money:1e8}),")"),disabled:i,onChange:this.wagerOnChange,error:s,helperText:s?p:"",type:"number",variant:"filled",style:{width:"200px"},InputProps:{startAdornment:n.createElement(l.a,{position:"start"},"$")}}),n.createElement("p",null,"Total earnings this session: ",n.createElement(r.a,{money:f}))),i?n.createElement("div",null,n.createElement(m.a,{color:"primary",onClick:this.playerHit},"Hit"),n.createElement(m.a,{color:"secondary",onClick:this.playerStay},"Stay")):n.createElement("div",null,n.createElement(m.a,{color:"primary",onClick:this.startOnClick,disabled:s||!this.canStartGame()},"Start")),(i||o!==d.Pending)&&n.createElement("div",null,n.createElement(h.a,{variant:"outlined",elevation:2},n.createElement("pre",null,"Player"),t.cards.map((e,t)=>n.createElement(c.a,{card:e,key:t})),n.createElement("pre",null,"Value(s): "),g.map((e,t)=>n.createElement("pre",{key:t},e))),n.createElement("br",null),n.createElement(h.a,{variant:"outlined",elevation:2},n.createElement("pre",null,"Dealer"),a.cards.map((e,t)=>n.createElement(c.a,{card:e,hidden:i&&0!==t,key:t})),!i&&n.createElement(n.Fragment,null,n.createElement("pre",null,"Value(s): "),y.map((e,t)=>n.createElement("pre",{key:t},e))))),o!==d.Pending&&n.createElement("p",null,o,this.isPlayerWinResult(o)&&n.createElement(n.Fragment,null," You gained ",n.createElement(r.a,{money:this.state.bet})),o===d.DealerWon&&n.createElement(n.Fragment,null," You lost ",n.createElement(r.a,{money:this.state.bet}))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(189),r=a(984);class i{constructor(e=1){var t,a,n;n=[],(a="cards")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.numDecks=e,this.reset()}shuffle(){this.cards=Object(r.shuffle)(this.cards)}drawCard(){if(0==this.cards.length)throw new Error("Tried to draw card from empty deck");return this.cards.shift()}safeDrawCard(){return 0===this.cards.length&&this.reset(),this.drawCard()}reset(){this.cards=[];for(let e=1;e<=13;++e)for(let t=0;t{var t,a;return r.a.createElement(i.a,s({},e,{classes:{...u(),...e.classes},InputProps:{classes:{...m(),...null===(t=e.InputProps)||void 0===t?void 0:t.classes},...e.InputProps},InputLabelProps:{classes:{...h(),...null===(a=e.InputLabelProps)||void 0===a?void 0:a.classes},...e.InputLabelProps}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(22),i=a(264),o=a(270),s=a(61);class l extends o.a{constructor(e){super(e),this.state={investment:1e3,result:n.createElement("span",null," "),status:"",playLock:!1},this.play=this.play.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e4&&(t=1e4),t<0&&(t=0),this.setState({investment:t})}play(e){if(this.reachedLimit(this.props.p))return;let t;t=i.a.random()<.5?"H":"T";const a=e===t;this.setState({result:n.createElement("span",{className:a?"text":"failure"},t),status:a?" win!":"lose!",playLock:!0}),setTimeout(()=>this.setState({playLock:!1}),250),a?this.win(this.props.p,this.state.investment):this.win(this.props.p,-this.state.investment),this.reachedLimit(this.props.p)}render(){return n.createElement(n.Fragment,null,n.createElement("pre",null,"+———————+"),n.createElement("pre",null,"| | | |"),n.createElement("pre",null,"| | ",this.state.result," | |"),n.createElement("pre",null,"| | | |"),n.createElement("pre",null,"+———————+"),n.createElement("span",{className:"text"},"Play for: "),n.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,value:this.state.investment}),n.createElement("br",null),n.createElement(r.a,{onClick:Object(s.a)(()=>this.play("H")),text:"Head!",disabled:this.state.playLock}),n.createElement(r.a,{onClick:Object(s.a)(()=>this.play("T")),text:"Tail!",disabled:this.state.playLock}),n.createElement("h1",null,this.state.status))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a(22),i=a(11),o=a(270),s=a(264),l=a(61);const c=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],u={Red:{match:e=>0!==e&&c.includes(e),payout:1},Black:{match:e=>!c.includes(e),payout:1},Odd:{match:e=>0!==e&&e%2==1,payout:1},Even:{match:e=>0!==e&&e%2==0,payout:1},High:{match:e=>0!==e&&e>18,payout:1},Low:{match:e=>0!==e&&e<19,payout:1},Third1:{match:e=>0!==e&&e<=12,payout:2},Third2:{match:e=>0!==e&&(e>=13&&e<=24),payout:2},Third3:{match:e=>0!==e&&e>=25,payout:2}};function m(e){return{match:t=>e===t,payout:36}}class h extends o.a{constructor(e){var t,a,n;super(e),n=-1,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.rng=new s.b((new Date).getTime()),this.state={investment:1e3,canPlay:!0,status:"waiting",n:0,lock:!0,strategy:{payout:0,match:()=>!1}},this.step=this.step.bind(this),this.currentNumber=this.currentNumber.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){this.state.lock||this.setState({n:Math.floor(37*Math.random())})}componentWillUnmount(){clearInterval(this.interval)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e7&&(t=1e7),t<0&&(t=0),this.setState({investment:t})}currentNumber(){if(0===this.state.n)return"0";const e=(t=this.state.n,[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].includes(t)?"R":"B");var t;return`${this.state.n}${e}`}play(e){this.reachedLimit(this.props.p)||(this.setState({canPlay:!1,lock:!1,status:"playing",strategy:e}),setTimeout(()=>{let e=Math.floor(37*this.rng.random()),t=n.createElement(n.Fragment,null),a=0,r=this.state.strategy.match(e);if(r&&Math.random()>.9)for(r=!1;this.state.strategy.match(e);)e++;r?(a=this.state.investment*this.state.strategy.payout,t=n.createElement(n.Fragment,null,"won ",n.createElement(i.a,{money:a}))):(a=-this.state.investment,t=n.createElement(n.Fragment,null,"lost ",n.createElement(i.a,{money:-a}))),this.win(this.props.p,a),this.setState({canPlay:!0,lock:!0,status:t,n:e}),this.reachedLimit(this.props.p)},1600))}render(){return n.createElement(n.Fragment,null,n.createElement("h1",null,this.currentNumber()),n.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),n.createElement("h1",null,this.state.status),n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"3",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(3)))})),n.createElement("td",null,n.createElement(r.a,{text:"6",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(6)))})),n.createElement("td",null,n.createElement(r.a,{text:"9",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(9)))})),n.createElement("td",null,n.createElement(r.a,{text:"12",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(12)))})),n.createElement("td",null,n.createElement(r.a,{text:"15",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(15)))})),n.createElement("td",null,n.createElement(r.a,{text:"18",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(18)))})),n.createElement("td",null,n.createElement(r.a,{text:"21",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(21)))})),n.createElement("td",null,n.createElement(r.a,{text:"24",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(24)))})),n.createElement("td",null,n.createElement(r.a,{text:"27",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(27)))})),n.createElement("td",null,n.createElement(r.a,{text:"30",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(30)))})),n.createElement("td",null,n.createElement(r.a,{text:"33",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(33)))})),n.createElement("td",null,n.createElement(r.a,{text:"36",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(36)))}))),n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"2",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(2)))})),n.createElement("td",null,n.createElement(r.a,{text:"5",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(5)))})),n.createElement("td",null,n.createElement(r.a,{text:"8",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(8)))})),n.createElement("td",null,n.createElement(r.a,{text:"11",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(11)))})),n.createElement("td",null,n.createElement(r.a,{text:"14",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(14)))})),n.createElement("td",null,n.createElement(r.a,{text:"17",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(17)))})),n.createElement("td",null,n.createElement(r.a,{text:"20",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(20)))})),n.createElement("td",null,n.createElement(r.a,{text:"23",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(23)))})),n.createElement("td",null,n.createElement(r.a,{text:"26",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(26)))})),n.createElement("td",null,n.createElement(r.a,{text:"29",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(29)))})),n.createElement("td",null,n.createElement(r.a,{text:"32",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(32)))})),n.createElement("td",null,n.createElement(r.a,{text:"35",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(35)))}))),n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"1",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(1)))})),n.createElement("td",null,n.createElement(r.a,{text:"4",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(4)))})),n.createElement("td",null,n.createElement(r.a,{text:"7",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(7)))})),n.createElement("td",null,n.createElement(r.a,{text:"10",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(10)))})),n.createElement("td",null,n.createElement(r.a,{text:"13",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(13)))})),n.createElement("td",null,n.createElement(r.a,{text:"16",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(16)))})),n.createElement("td",null,n.createElement(r.a,{text:"19",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(19)))})),n.createElement("td",null,n.createElement(r.a,{text:"22",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(22)))})),n.createElement("td",null,n.createElement(r.a,{text:"25",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(25)))})),n.createElement("td",null,n.createElement(r.a,{text:"28",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(28)))})),n.createElement("td",null,n.createElement(r.a,{text:"31",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(31)))})),n.createElement("td",null,n.createElement(r.a,{text:"34",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(34)))}))),n.createElement("tr",null,n.createElement("td",{colSpan:4},n.createElement(r.a,{text:"1 to 12",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Third1))})),n.createElement("td",{colSpan:4},n.createElement(r.a,{text:"13 to 24",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Third2))})),n.createElement("td",{colSpan:4},n.createElement(r.a,{text:"25 to 36",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Third3))}))),n.createElement("tr",null,n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Red",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Red))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Black",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Black))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Odd",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Odd))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Even",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Even))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"High",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.High))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Low",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Low))}))),n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"0",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(0)))}))))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a(22),i=a(11),o=a(264),s=a(270),l=a(61);const c=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function u(e,t){switch(e){case"$":return[20,200,1e3][t];case"@":return[8,80,400][t];case"♥":case"?":return[6,20,150][t];case"D":case"E":return[1,8,30][t];default:return[1,5,20][t]}}const m=[[[0,0],[0,1],[0,2],[0,3],[0,4]],[[1,0],[1,1],[1,2],[1,3],[1,4]],[[2,0],[2,1],[2,2],[2,3],[2,4]],[[2,0],[1,1],[0,2],[1,3],[2,4]],[[0,0],[1,1],[2,2],[1,3],[0,4]],[[0,0],[1,1],[1,2],[1,3],[0,4]],[[2,0],[1,1],[1,2],[1,3],[2,4]],[[1,0],[0,1],[0,2],[0,3],[1,4]],[[1,0],[2,1],[2,2],[2,3],[1,4]]];class h extends s.a{constructor(e){var t,a,n;super(e),n=-1,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.rng=new o.b(this.props.p.totalPlaytime),this.state={index:[0,0,0,0,0],investment:1e3,locks:[0,0,0,0,0],canPlay:!0,status:"waiting"},this.play=this.play.bind(this),this.lock=this.lock.bind(this),this.unlock=this.unlock.bind(this),this.step=this.step.bind(this),this.checkWinnings=this.checkWinnings.bind(this),this.getTable=this.getTable.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){let e=!1;const t=this.state.index.slice();for(const a in t)(t[a]!==this.state.locks[a]||e)&&(t[a]=(t[a]+1)%c.length,e=!0);this.setState({index:t}),e&&t.every((e,t)=>e===this.state.locks[t])&&this.checkWinnings()}componentWillUnmount(){clearInterval(this.interval)}getTable(){return[[c[(this.state.index[0]+c.length-1)%c.length],c[(this.state.index[1]+c.length-1)%c.length],c[(this.state.index[2]+c.length-1)%c.length],c[(this.state.index[3]+c.length-1)%c.length],c[(this.state.index[4]+c.length-1)%c.length]],[c[this.state.index[0]],c[this.state.index[1]],c[this.state.index[2]],c[this.state.index[3]],c[this.state.index[4]]],[c[(this.state.index[0]+1)%c.length],c[(this.state.index[1]+1)%c.length],c[(this.state.index[2]+1)%c.length],c[(this.state.index[3]+1)%c.length],c[(this.state.index[4]+1)%c.length]]]}play(){this.reachedLimit(this.props.p)||(this.setState({status:"playing"}),this.win(this.props.p,-this.state.investment),this.state.canPlay&&(this.unlock(),setTimeout(this.lock,2e3*this.rng.random()+1e3)))}lock(){this.setState({locks:[Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length)]})}checkWinnings(){const e=this.getTable(),t=function(t){const a=[];for(const n of t)a.push(e[n[0]][n[1]]);return a},a=function(e){let t=1;for(let a=1;a0?"gained":"lost"," ",n.createElement(i.a,{money:Math.abs(r)})),canPlay:!0}),this.reachedLimit(this.props.p)}unlock(){this.setState({locks:[-1,-1,-1,-1,-1],canPlay:!1})}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e6&&(t=1e6),t<0&&(t=0),this.setState({investment:t})}render(){const e=this.getTable();return n.createElement(n.Fragment,null,n.createElement("pre",null,"+———————————————————————+"),n.createElement("pre",null,"| | ",e[0][0]," | ",e[0][1]," | ",e[0][2]," | ",e[0][3]," | ",e[0][4]," | |"),n.createElement("pre",null,"| | | | | | | |"),n.createElement("pre",null,"| | ",c[this.state.index[0]]," | ",c[this.state.index[1]]," | ",c[this.state.index[2]]," | ",c[this.state.index[3]]," | ",c[this.state.index[4]]," | |"),n.createElement("pre",null,"| | | | | | | |"),n.createElement("pre",null,"| | ",c[(this.state.index[0]+1)%c.length]," | ",c[(this.state.index[1]+1)%c.length]," | ",c[(this.state.index[2]+1)%c.length]," | ",c[(this.state.index[3]+1)%c.length]," | ",c[(this.state.index[4]+1)%c.length]," | |"),n.createElement("pre",null,"+———————————————————————+"),n.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),n.createElement(r.a,{onClick:Object(l.a)(this.play),text:"Spin!",disabled:!this.state.canPlay}),n.createElement("h1",null,this.state.status),n.createElement("h2",null,"Pay lines"),n.createElement("pre",null,"----- ····· ·····"),n.createElement("pre",null,"····· ----- ·····"),n.createElement("pre",null,"····· ····· -----"),n.createElement("br",null),n.createElement("pre",null,"··^·· \\···/ \\···/"),n.createElement("pre",null,"·/·\\· ·\\·/· ·---·"),n.createElement("pre",null,"/···\\ ··v·· ·····"),n.createElement("br",null),n.createElement("pre",null,"····· ·---· ·····"),n.createElement("pre",null,"·---· /···\\ \\···/"),n.createElement("pre",null,"/···\\ ····· ·---·"))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){const[t,a]=Object(n.useState)(e.content);return Object(n.useEffect)(()=>{let e=5;const n=setInterval(()=>{if(e--,e>0)return;e=5*Math.random();const n=Math.random()*t.length,r=t.charAt(n);a(function(e,t,a){return e.substring(0,t)+a+e.substring(t+1)}(t,n,function(e){const t=e=>e[Math.floor(Math.random()*e.length)],a=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const n of a)if(n.includes(e))return t(n);return t("!@#$%^&*()_+|\\';\"/.,?`~")}(r))),setTimeout(()=>{a(t)},50)},100);return()=>{clearInterval(n)}},[]),r.a.createElement("span",null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(441),o=a(215),s=a(30),l=a(549),c=a(105),u=a(48);function m(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("div",null,r.a.createElement(o.a,null,r.a.createElement(s.a,null,"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later.")),r.a.createElement(l.a,null,Object(i.a)(e.player).map(t=>{const a=t.create;return null===a?r.a.createElement(r.a.Fragment,null):r.a.createElement(c.a,{title:a.tooltip},r.a.createElement(u.a,{onClick:()=>e.player.startCreateProgramWork(t.name,a.time,a.level)},t.name))}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return T}));var n=a(0),r=a.n(n),i=a(22),o=a(992),s=a(17),l=a(1005),c=a(1006),u=a(88),m=a(9),h=a(295),p=a(83),d=a(272),f=a(195),g=a(416),y=a(222),b=a(2),E=a(538),v=a(539),k=a(373),_=a(33),C=a(49);let w=[];!function(){const e=Object(k.a)({});w=function e(t){let a=[];const n=Object.keys(t);for(const r of n)"object"==typeof t[r]&&(a.push(r),a=a.concat(e(t[r]))),"function"==typeof t[r]&&a.push(r);return a}(e);const t=["heart","break","exploit","bypass","corporation"];w=w.filter(e=>!t.includes(e))}();let S="",x="",O=null;function T(e){const t=Object(n.useRef)(null),[a,k]=Object(n.useState)(e.filename?e.filename:S),[T,M]=Object(n.useState)(e.code?e.code:x),[P,A]=Object(n.useState)("RAM: ???"),[R,N]=Object(n.useState)({theme:_.a.MonacoTheme,insertSpaces:_.a.MonacoInsertSpaces});function I(){if(null!==t.current){const e=t.current.getPosition();null!==e&&E.a.saveCursor(a,{row:e.lineNumber,column:e.column})}if(O=null,C.a.isRunning&&C.a.currStep===C.d.TerminalTypeScript){if("n00dles.script"!==a)return void Object(m.a)("Leave the script name as 'n00dles'!");if(-1==T.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void Object(m.a)("Please copy and paste the code from the tutorial!");const t=e.player.getCurrentServer();if(null===t)throw new Error("Server should not be null but it is.");for(let n=0;n0)){switch(a){case y.a.ImportError:A("RAM: Import Error");break;case y.a.URLImportError:A("RAM: HTTP Import Error");break;case y.a.SyntaxError:default:A("RAM: Syntax Error")}return new Promise(()=>{})}A("RAM: "+b.a.formatRAM(a))}return Object(n.useEffect)(()=>{""!==e.filename&&(S=e.filename,x=e.code,O=null)},[]),Object(n.useEffect)(()=>{const e=setInterval(j,1e3);return()=>clearInterval(e)},[T]),Object(n.useEffect)(()=>{function e(e){_.a.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),I())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),r.a.createElement("div",{className:"script-editor-wrapper"},r.a.createElement("div",{id:"script-editor-filename-wrapper"},r.a.createElement("p",{id:"script-editor-filename-tag",className:"noselect"}," ",r.a.createElement("strong",{style:{backgroundColor:"#555"}},"Script name: ")),r.a.createElement("input",{id:"script-editor-filename",type:"text",maxLength:100,tabIndex:1,value:a,onChange:function(e){S=a,k(e.target.value)}}),r.a.createElement(i.a,{text:"options",onClick:function(){const e="script-editor-options-popup",t={theme:"",insertSpaces:!1};Object.assign(t,R),Object(s.a)(e,l.a,{id:e,options:t,save:e=>{N(e),_.a.MonacoTheme=e.theme,_.a.MonacoInsertSpaces=e.insertSpaces}})}})),r.a.createElement(o.a,{beforeMount:function(e){e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const a of w)t.push({label:a,kind:e.languages.CompletionItemKind.Function,insertText:a,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(v.a,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(v.a,"netscript.d.ts")},onMount:function(e){if(t.current=e,null===t.current)return;const n=E.a.getCursor(a);-1!==n.row?t.current.setPosition({lineNumber:n.row,column:n.column}):null!==O&&t.current.setPosition({lineNumber:O.lineNumber,column:O.column+1}),t.current.focus()},loading:r.a.createElement("p",null,"Loading script editor!"),height:"80%",defaultLanguage:"javascript",defaultValue:T,onChange:function(e){void 0!==e&&(x=e,null!==t.current&&(O=t.current.getPosition()),M(e))},theme:R.theme,options:R}),r.a.createElement("div",{id:"script-editor-buttons-wrapper"},r.a.createElement(i.a,{text:"Beautify",onClick:function(){if(null===t.current)return;const e=Object(c.js_beautify)(T,{indent_with_tabs:!R.insertSpaces,indent_size:4,brace_style:"preserve-inline"});t.current.setValue(e)}}),r.a.createElement("p",{id:"script-editor-status-text",style:{display:"inline-block",margin:"10px"}},P),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:I},"Save & Close (Ctrl/Cmd + b)"),r.a.createElement("a",{className:"std-button",style:{display:"inline-block"},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Netscript Documentation")))}},,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(22),o=a(17);function s(e){const[t,a]=Object(n.useState)(e.options.theme),[s,l]=Object(n.useState)(e.options.insertSpaces);return r.a.createElement("div",{className:"editor-options-container noselect"},r.a.createElement("div",{className:"editor-options-line"},r.a.createElement("p",null,"Theme: "),r.a.createElement("select",{className:"dropdown",onChange:e=>a(e.target.value),defaultValue:t},r.a.createElement("option",{value:"vs-dark"},"vs-dark"),r.a.createElement("option",{value:"light"},"light"))),r.a.createElement("div",{className:"editor-options-line"},r.a.createElement("p",null,"Use whitespace over tabs: "),r.a.createElement("input",{type:"checkbox",onChange:e=>l(e.target.checked),checked:s})),r.a.createElement("br",null),r.a.createElement(i.a,{style:{width:"50px"},text:"Save",onClick:function(){e.save({theme:t,insertSpaces:s}),Object(o.b)(e.id)}}))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(540),r=a(0);function i(e){const t=function(e,t){let a=-1;for(let n=0;n{if(n<=t+1)return r.createElement("ul",{key:n},r.createElement("p",null,"[",a.fulfilled(e.player)?"x":" ","] ",a.title))});return r.createElement("div",{className:"milestones-container"},r.createElement("h1",null,"Milestones"),r.createElement("p",null,"Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset when you install Augmentations."),r.createElement("br",null),r.createElement("h2",null,"Completing fl1ght.exe"),r.createElement("li",null,a))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(30),o=a(396),s=a(67),l=a(354),c=a(214),u=a(397),m=a(215),h=a(243),p=a(1009);function d({terminal:e}){return r.a.createElement(i.a,{color:"primary",paragraph:!1},e.getProgressText())}const f=Object(c.a)(e=>Object(u.a)({nopadding:{padding:e.spacing(0)},preformatted:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0)},list:{padding:e.spacing(0),height:"100%"}}));function g({terminal:e,engine:t,player:a}){const c=Object(n.useRef)(null),u=Object(n.useState)(!1)[1];function g(){const e=c.current;null!==e&&setTimeout(()=>e.scrollIntoView(!0),50)}Object(n.useEffect)(()=>{const t=setInterval(()=>{e.pollChanges()&&u(e=>!e)},100);return()=>clearInterval(t)},[]),g(),Object(n.useEffect)(()=>{setTimeout(g,50)},[]);const y=f();return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{width:"100%",minHeight:"100vh",px:1,display:"flex",alignItems:"flex-end"},r.a.createElement(o.a,{classes:{root:y.list}},e.outputHistory.map((t,n)=>t instanceof h.b?r.a.createElement(s.a,{key:n,classes:{root:y.nopadding}},r.a.createElement(i.a,{classes:{root:y.preformatted},color:t.color,paragraph:!1},t.text)):t instanceof h.a?r.a.createElement(s.a,{key:n,classes:{root:y.nopadding}},r.a.createElement(l.a,{classes:{root:y.preformatted},color:"secondary",paragraph:!1,onClick:()=>e.connectToServer(a,t.hostname)},"> ",t.hostname)):void 0),null!==e.action&&r.a.createElement(s.a,{classes:{root:y.nopadding}},r.a.createElement(d,{terminal:e})," ")),r.a.createElement("div",{ref:c})),r.a.createElement(m.a,{position:"sticky",bottom:0,width:"100%",px:1},r.a.createElement(p.a,{player:a,engine:t,terminal:e})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(30),o=a(214),s=a(397),l=a(395),c=a(286),u=a(73),m=a(1010),h=a(1012),p=a(63);const d=Object(o.a)(e=>Object(s.a)({textfield:{margin:0,width:"100%"},input:{backgroundColor:"#000"},nopadding:{padding:0},preformatted:{whiteSpace:"pre-wrap",margin:0},list:{padding:0,height:"100%"}}));let f="";function g({terminal:e,engine:t,player:a}){const o=Object(n.useRef)(null),[s,g]=Object(n.useState)(f),[y,b]=Object(n.useState)([]),E=d();function v(e){f=e,g(e)}function k(e){const t=o.current;if(!t)return;const a=s.length,n=t.selectionStart;if(null!==n)switch(e.toLowerCase()){case"home":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(a,a);break;case"prevchar":n>0&&t.setSelectionRange(n-1,n-1);break;case"prevword":for(let e=n-2;e>=0;--e)if(" "===t.value.charAt(e))return void t.setSelectionRange(e+1,e+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(n+1,n+1);break;case"nextword":for(let e=n+1;e<=a;++e)if(" "===t.value.charAt(e))return void t.setSelectionRange(e,e);t.setSelectionRange(a,a);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}return Object(n.useEffect)(()=>{function t(t){if(e.contractOpen)return;if(t.metaKey||t.ctrlKey)return;const n=o.current;n&&n.focus(),t.keyCode===u.a.C&&t.ctrlKey&&e.finishAction(a,!0)}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)}),r.a.createElement(r.a.Fragment,null,y.length>0&&r.a.createElement(c.a,{square:!0},r.a.createElement(i.a,{classes:{root:E.preformatted},color:"primary",paragraph:!1},"Possible autocomplete candidate:"),r.a.createElement(i.a,{classes:{root:E.preformatted},color:"primary",paragraph:!1},y.join(" "))),r.a.createElement(l.a,{variant:"standard",color:null===e.action?"primary":"secondary",autoFocus:!0,disabled:null!==e.action,autoComplete:"off",classes:{root:E.textfield},value:s,onChange:function(e){v(e.target.value),b([])},inputRef:o,InputProps:{id:"terminal-input",className:E.input,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{color:null===e.action?"primary":"secondary",flexShrink:0},"[",a.getCurrentServer().hostname," ~",e.cwd(),"]> ")),spellCheck:!1,onKeyDown:function(n){if(n.keyCode===u.a.ENTER&&""!==s)return n.preventDefault(),e.print(`[${a.getCurrentServer().hostname} ~${e.cwd()}]> ${s}`),e.executeCommands(t,a,s),void v("");if(n.keyCode===u.a.TAB&&""!==s){n.preventDefault();let t=s;const r=t.lastIndexOf(";");-1!==r&&(t=t.slice(r+1)),t=t.trim(),t=t.replace(/\s\s+/g," ");const i=t.split(" ");let o=i.length-2;o<-1&&(o=0);const l=Object(m.a)(a,t,o,e.cwd());if(0==l.length)return;let c="",u="";if(0==i.length)return;1==i.length?u=i[0]:2==i.length?(u=i[0],c=i[1]):3==i.length?(u=i[0]+" "+i[1],c=i[2]):(c=i.pop()+"",u=i.join(" "));const p=Object(h.a)(u,c,l,s);"string"==typeof p&&""!==p&&v(p),Array.isArray(p)&&b(p)}if(n.keyCode===u.a.L&&n.ctrlKey&&(n.preventDefault(),e.clear()),n.keyCode===u.a.UPARROW||p.a.ENABLE_BASH_HOTKEYS&&n.keyCode===u.a.P&&n.ctrlKey){p.a.ENABLE_BASH_HOTKEYS&&n.preventDefault();const t=e.commandHistoryIndex,a=e.commandHistory.length;if(0==a)return;(t<0||t>a)&&(e.commandHistoryIndex=a),0!=t&&--e.commandHistoryIndex;v(e.commandHistory[e.commandHistoryIndex]);const r=o.current;r&&setTimeout((function(){r.selectionStart=r.selectionEnd=1e4}),10)}if(n.keyCode===u.a.DOWNARROW||p.a.ENABLE_BASH_HOTKEYS&&n.keyCode===u.a.M&&n.ctrlKey){p.a.ENABLE_BASH_HOTKEYS&&n.preventDefault();const t=e.commandHistoryIndex,a=e.commandHistory.length;if(0==a)return;if((t<0||t>a)&&(e.commandHistoryIndex=a),t==a||t==a-1)e.commandHistoryIndex=a,v("");else{++e.commandHistoryIndex;v(e.commandHistory[e.commandHistoryIndex])}}p.a.ENABLE_BASH_HOTKEYS&&(n.keyCode===u.a.A&&n.ctrlKey&&(n.preventDefault(),k("home")),n.keyCode===u.a.E&&n.ctrlKey&&(n.preventDefault(),k("end")),n.keyCode===u.a.B&&n.ctrlKey&&(n.preventDefault(),k("prevchar")),n.keyCode===u.a.B&&n.altKey&&(n.preventDefault(),k("prevword")),n.keyCode===u.a.F&&n.ctrlKey&&(n.preventDefault(),k("nextchar")),n.keyCode===u.a.F&&n.altKey&&(n.preventDefault(),k("nextword")),n.keyCode!==u.a.H&&n.keyCode!==u.a.D||!n.ctrlKey||(!function(e){const t=o.current;if(!t)return;const a=s.length,n=t.selectionStart;if(null===n)return;const r=t.value;switch(e.toLowerCase()){case"backspace":n>0&&n<=a+1&&v(r.substr(0,n-1)+r.substr(n));break;case"deletewordbefore":for(let e=n-1;e>0;--e)if(" "===r.charAt(e))return void v(r.substr(0,e)+r.substr(n));break;case"deletewordafter":for(let e=n+1;e<=s.length+1;++e)if(" "===r.charAt(e))return void v(r.substr(0,n)+r.substr(e))}}("backspace"),n.preventDefault()))}}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(88),r=a(1011),i=a(89),o=a(221),s=a(95),l=a(27);const c=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","download","expr","free","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan","scan-analyze","scp","sudov","tail","theme","top"];function u(e,t,a,u=""){let m=[];m=m.concat(Object.keys(i.b));const h=e.getCurrentServer(),p=e.getHomeComputer();let d="",f=null;function g(){for(const e of h.contracts)m.push(e.fn)}function y(){for(const e of h.messages)e instanceof s.a||m.push(e)}function b(){for(const e of p.programs)m.push(e)}function E(){for(const e of h.scripts){const t=_(e.filename);t&&m.push(t)}}function v(){for(const e of h.textFiles){const t=_(e.fn);t&&m.push(t)}}function k(){const e=Object(r.a)(h,null==f?"/":f);for(let t=0;t=0;--t)a[t].toLowerCase().startsWith(e.toLowerCase())||a.splice(t,1);else for(let e=a.length-1;e>=0;--e)a[e].toLowerCase().startsWith(t.toLowerCase())||a.splice(e,1);const i=r.lastIndexOf(";");let o="";if(0!==a.length){if(1===a.length)return o=""===t?a[0]+" ":e+" "+a[0],-1===i?o:r.slice(0,i+1)+" "+o;{const o=Object(n.e)(a);return""===t?o===e?a:-1===i?o:`${r.slice(0,i+1)} ${o}`:o===t?a:-1==i?`${e} ${o}`:`${r.slice(0,i+1)} ${e} ${o}`}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"Tutorial (AKA Links to Documentation)"),r.a.createElement("a",{id:"tutorial-getting-started-link",className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html"},"Getting Started"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html"},"Servers & Networking"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html"},"Hacking"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html"},"Scripts"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript.html"},"Netscript Programming Language"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html"},"Traveling"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html"},"Companies"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html"},"Infiltration"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html"},"Factions"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html"},"Augmentations"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/shortcuts.html"},"Keyboard Shortcuts"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(2),o=a(165),s=a(9),l=a(12),c=a(6),u=a(50),m=a(170),h=a(28),p=a(184),d=a(11);function f(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}function f(e){const t=[["Total:",r.a.createElement(d.a,{money:e.total})]];return e.bladeburner&&t.push(["Bladeburner:",r.a.createElement(d.a,{money:e.bladeburner})]),e.codingcontract&&t.push(["Coding Contracts:",r.a.createElement(d.a,{money:e.codingcontract})]),e.work&&t.push(["Company Work:",r.a.createElement(d.a,{money:e.work})]),e.class&&t.push(["Class:",r.a.createElement(d.a,{money:e.class})]),e.corporation&&t.push(["Corporation:",r.a.createElement(d.a,{money:e.corporation})]),e.crime&&t.push(["Crimes:",r.a.createElement(d.a,{money:e.crime})]),e.gang&&t.push(["Gang:",r.a.createElement(d.a,{money:e.gang})]),e.hacking&&t.push(["Hacking:",r.a.createElement(d.a,{money:e.hacking})]),e.hacknetnode&&t.push(["Hacknet Nodes:",r.a.createElement(d.a,{money:e.hacknetnode})]),e.hospitalization&&t.push(["Hospitalization:",r.a.createElement(d.a,{money:e.hospitalization})]),e.infiltration&&t.push(["Infiltration:",r.a.createElement(d.a,{money:e.infiltration})]),e.stock&&t.push(["Stock Market:",r.a.createElement(d.a,{money:e.stock})]),e.casino&&t.push(["Casino:",r.a.createElement(d.a,{money:e.casino})]),e.sleeves&&t.push(["Sleeves:",r.a.createElement(d.a,{money:e.sleeves})]),Object(p.a)(t)}function g(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("table",null,r.a.createElement("tbody",null,e.rows.map(e=>r.a.createElement("tr",{key:e[0]},r.a.createElement("td",{key:"0"},e[0]+" multiplier:"),r.a.createElement("td",{key:"1",style:{textAlign:"right",paddingLeft:"5px"}},i.a.formatPercentage(e[1])),function(e){return u.a[5]>0&&e.length>2&&e[1]!=e[2]?r.a.createElement("td",{key:"2",style:{textAlign:"right"}}," ","(",i.a.formatPercentage(e[2]),")"):r.a.createElement(r.a.Fragment,null)}(e))))))}Object(n.useEffect)(()=>{const e=setInterval(a,20);return()=>clearInterval(e)},[]);const y=[["Time played since last Augmentation:",Object(l.b)(e.player.playtimeSinceLastAug)]];return e.player.sourceFiles.length>0&&y.push(["Time played since last Bitnode destroyed:",Object(l.b)(e.player.playtimeSinceLastBitnode)]),y.push(["Total Time played:",Object(l.b)(e.player.totalPlaytime)]),r.a.createElement(r.a.Fragment,null,r.a.createElement("pre",null,r.a.createElement("b",null,"General"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("span",null,"Current City: ",e.player.city),r.a.createElement("br",null),r.a.createElement((function(){return e.player.companyName?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Employer at which you last worked: ",e.player.companyName),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement((function(){return""!==e.player.companyName?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Job you last worked: ",e.player.jobs[e.player.companyName]),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement((function(){return e.player.jobs&&0!==Object.keys(e.player.jobs).length?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"All Employers:"),r.a.createElement("br",null),r.a.createElement("ul",null,Object.keys(e.player.jobs).map(e=>r.a.createElement("li",{key:e}," * ",e))),r.a.createElement("br",null),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement("span",null,"Money: ",r.a.createElement(d.a,{money:e.player.money.toNumber()})),r.a.createElement("button",{className:"popup-box-button",style:{display:"inline-block",float:"none"},onClick:function(){let t=r.a.createElement(r.a.Fragment,null,r.a.createElement("u",null,"Money earned since you last installed Augmentations:"),r.a.createElement("br",null),f(e.player.moneySourceA));0!==e.player.sourceFiles.length&&(t=r.a.createElement(r.a.Fragment,null,t,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("u",null,"Money earned in this BitNode:"),r.a.createElement("br",null),f(e.player.moneySourceB))),Object(s.a)(t,!1)}},"Money Statistics & Breakdown"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("b",null,"Stats"),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",{key:"0"},r.a.createElement("td",{key:"0"},"Hacking:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.hacking_skill)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.hacking_exp)," exp)")),r.a.createElement("tr",{key:"1"},r.a.createElement("td",{key:"0"},"Strength:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.strength)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.strength_exp)," exp)")),r.a.createElement("tr",{key:"2"},r.a.createElement("td",{key:"0"},"Defense:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.defense)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.defense_exp)," exp)")),r.a.createElement("tr",{key:"3"},r.a.createElement("td",{key:"0"},"Dexterity:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.dexterity)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.dexterity_exp)," exp)")),r.a.createElement("tr",{key:"4"},r.a.createElement("td",{key:"0"},"Agility:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.agility)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.agility_exp)," exp)")),r.a.createElement("tr",{key:"5"},r.a.createElement("td",{key:"0"},"Charisma:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.charisma)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.charisma_exp)," exp)")),r.a.createElement((function(){return e.player.intelligence>0&&(5===e.player.bitNodeN||u.a[5]>0)?r.a.createElement("tr",{key:"5"},r.a.createElement("td",null,"Intelligence:"),r.a.createElement("td",{style:{textAlign:"right"}},i.a.formatSkill(e.player.intelligence))):r.a.createElement(r.a.Fragment,null)}),null))),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Hacking Chance",e.player.hacking_chance_mult],["Hacking Speed",e.player.hacking_speed_mult],["Hacking Money",e.player.hacking_money_mult,e.player.hacking_money_mult*c.a.ScriptHackMoney],["Hacking Growth",e.player.hacking_grow_mult,e.player.hacking_grow_mult*c.a.ServerGrowthRate]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Hacking Level",e.player.hacking_mult,e.player.hacking_mult*c.a.HackingLevelMultiplier],["Hacking Experience",e.player.hacking_exp_mult,e.player.hacking_exp_mult*c.a.HackExpGain]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Strength Level",e.player.strength_mult,e.player.strength_mult*c.a.StrengthLevelMultiplier],["Strength Experience",e.player.strength_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Defense Level",e.player.defense_mult,e.player.defense_mult*c.a.DefenseLevelMultiplier],["Defense Experience",e.player.defense_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Dexterity Level",e.player.dexterity_mult,e.player.dexterity_mult*c.a.DexterityLevelMultiplier],["Dexterity Experience",e.player.dexterity_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Agility Level",e.player.agility_mult,e.player.agility_mult*c.a.AgilityLevelMultiplier],["Agility Experience",e.player.agility_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Charisma Level",e.player.charisma_mult,e.player.charisma_mult*c.a.CharismaLevelMultiplier],["Charisma Experience",e.player.charisma_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Hacknet Node production",e.player.hacknet_node_money_mult,e.player.hacknet_node_money_mult*c.a.HacknetNodeMoney],["Hacknet Node purchase cost",e.player.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.player.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.player.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.player.hacknet_node_level_cost_mult]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Company reputation gain",e.player.company_rep_mult],["Faction reputation gain",e.player.faction_rep_mult,e.player.faction_rep_mult*c.a.FactionWorkRepGain],["Salary",e.player.work_money_mult,e.player.work_money_mult*c.a.CompanyWorkMoney]]}),r.a.createElement("br",null),r.a.createElement(g,{rows:[["Crime success",e.player.crime_success_mult],["Crime money",e.player.crime_money_mult,e.player.crime_money_mult*c.a.CrimeMoney]]}),r.a.createElement("br",null),r.a.createElement((function(){return e.player.canAccessBladeburner()?r.a.createElement(r.a.Fragment,null,r.a.createElement(g,{rows:[["Bladeburner Success Chance",e.player.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.player.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.player.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.player.bladeburner_success_chance_mult]]}),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement("br",null),r.a.createElement("b",null,"Misc."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("span",null,`Servers owned: ${e.player.purchasedServers.length} / ${Object(m.b)()}`),r.a.createElement("br",null),r.a.createElement((function(){return 9===e.player.bitNodeN||u.a[9]>0?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,`Hacknet Servers owned: ${e.player.hacknetNodes.length} / ${h.b.MaxServers}`),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Hacknet Nodes owned: "+e.player.hacknetNodes.length),r.a.createElement("br",null))}),null),r.a.createElement("span",null,"Augmentations installed: "+e.player.augmentations.length),r.a.createElement("br",null),r.a.createElement("br",null),Object(p.a)(y),r.a.createElement("br",null),r.a.createElement((function(){if(e.player.sourceFiles.length>0){const t="BitNode"+e.player.bitNodeN;return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Current BitNode: ",e.player.bitNodeN," (",o.a[t].name,")"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("div",{style:{width:"60%",fontSize:"13px",marginLeft:"2%"}},r.a.createElement("span",{style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},o.a[t].info)))}return r.a.createElement(r.a.Fragment,null)}),null)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(1016),o=a(1017);function s(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,20);return()=>clearInterval(e)},[]),r.a.createElement("div",{className:"active-scripts-container"},r.a.createElement("p",null,"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running."),r.a.createElement(i.a,e),r.a.createElement(o.a,e))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(11);function i(e){const t=e.p.scriptProdSinceLastAug/(e.p.playtimeSinceLastAug/1e3);let a=0;for(const t of e.workerScripts.values())a+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return n.createElement("p",{id:"active-scripts-total-prod"},"Total online production of Active scripts: ",n.createElement("span",{className:"money-gold"},n.createElement("span",{id:"active-scripts-total-production-active"},n.createElement(r.a,{money:a}))," ","/ sec"),n.createElement("br",null),"Total online production since last Aug installation: ",n.createElement("span",{id:"active-scripts-total-prod-aug-total",className:"money-gold"},n.createElement(r.a,{money:e.p.scriptProdSinceLastAug}))," (",n.createElement("span",{className:"money-gold"},n.createElement("span",{id:"active-scripts-total-prod-aug-avg",className:"money-gold"},n.createElement(r.a,{money:t}))," ","/ sec"),")")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(1018),i=a(207),o=a(35);class s extends n.Component{constructor(e){var t,a,n;super(e),n={},(a="serverToScriptMap")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.state={rerenderFlag:!1},this.updateServerToScriptsMap(),this.rerender=this.rerender.bind(this)}componentDidMount(){i.a.addSubscriber({cb:this.rerender,id:"ActiveScriptsUI"})}componentWillUnmount(){i.a.removeSubscriber("ActiveScriptsUI")}updateServerToScriptsMap(){const e={};for(const t of this.props.workerScripts.values()){const a=Object(o.b)(t.serverIp);null!=a?(null==e[a.hostname]&&(e[a.hostname]={server:a,workerScripts:[]}),e[a.hostname].workerScripts.push(t)):console.warn("WorkerScript has invalid IP address: "+t.serverIp)}this.serverToScriptMap=e}rerender(){this.updateServerToScriptsMap(),this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=Object.keys(this.serverToScriptMap).map(e=>{const t=this.serverToScriptMap[e];return n.createElement(r.a,{key:e,server:t.server,workerScripts:t.workerScripts})});return n.createElement("ul",{className:"active-scripts-list",id:"active-scripts-list"},e)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(163),i=a(1019),o=a(140);function s(e){const t=e.server,a=`${t.hostname}${" ".repeat(18)}`.slice(0,Math.max(t.hostname.length,18)),s={progress:t.ramUsed/t.maxRam,totalTicks:30},l=`${a} ${Object(o.a)(s)}`;return n.createElement(r.a,{headerContent:n.createElement("pre",null,l),panelContent:n.createElement(i.a,{workerScripts:e.workerScripts})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(541),o=a(279);function s(e){if(e.workerScripts.length>20)return r.a.createElement(l,{workerScripts:e.workerScripts});const t=e.workerScripts.map(e=>r.a.createElement(i.a,{key:`${e.name}_${e.args}`,workerScript:e}));return r.a.createElement("ul",null,t)}function l(e){const[t,a]=Object(n.useState)(0),s=[],l=Math.ceil(e.workerScripts.length/20),c=Math.min(20*(t+1),e.workerScripts.length);for(let a=20*t;a(t+=e,u(t=Math.round(t))))}return m!==t&&a(m),r.a.createElement(r.a.Fragment,null,r.a.createElement("ul",null,s),r.a.createElement(o.a,{onClick:()=>h(-1e99),text:"<<"}),r.a.createElement(o.a,{onClick:()=>h(-1),text:"<"}),r.a.createElement("span",{className:"text"},t+1," / ",l),r.a.createElement(o.a,{onClick:()=>h(1),text:">"}),r.a.createElement(o.a,{onClick:()=>h(1e99),text:">>"}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";var n=a(1),r=a(216);setInterval((function(){"5.5e+1"!==55..toExponential()&&n.a.giveExploit(r.a.PrototypeTampering)}),9e5)},function(e,t,a){"use strict";var n=a(1),r=a(216);!function(){function e(e){if(!(e.target&&e.target instanceof Element))return;"none"===window.getComputedStyle(e.target).display&&e.isTrusted&&n.a.giveExploit(r.a.Unclickable)}document.addEventListener("DOMContentLoaded",(function t(){const a=document.getElementById("unclickable");null!=a?(a.addEventListener("click",e),document.removeEventListener("DOMContentLoaded",t)):console.error("Could not find the unclickable elem for the related exploit.")}))}()}]); //# sourceMappingURL=engine.bundle.js.map \ No newline at end of file diff --git a/src/Terminal/Parser.ts b/src/Terminal/Parser.ts index b6fbf792b..46157f1db 100644 --- a/src/Terminal/Parser.ts +++ b/src/Terminal/Parser.ts @@ -4,9 +4,8 @@ function isNumber(str: string): boolean { if (typeof str != "string") { return false; } // Only process strings - return !isNaN(parseFloat(str)); + return !isNaN(str as unknown as number) && !isNaN(parseFloat(str)); } - export function ParseCommands(commands: string): string[] { // Sanitize input commands = commands.trim();