diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index 0de5473c7..0deb0d77a 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;u0)return e.ramUsage;const t=n.b[e.server];if(null==t)return 0;for(let a=0;ae.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(102),i=a(3);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(21),o=a(7);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 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";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(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 o})),a.d(t,"b",(function(){return s}));var n=a(202),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 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,"b",(function(){return n})),a.d(t,"a",(function(){return r}));const n="Type 'help name' to learn more about the command 'name'

alias [-g] [name=\"value\"] Create or display Terminal aliases
analyze Get information about the current machine
backdoor Install a backdoor on the current machine
buy [-l/program] Purchase a program through the Dark Web
cat [file] Display a .msg, .lit, or .txt file
cd [dir] Change to a new directory
check [script] [args...] Print a script's logs to Terminal
clear Clear all text on the terminal
cls See 'clear' command
connect [ip/hostname] Connects to a remote server
download [script/text file] Downloads scripts or text files to your computer
expr [math expression] Evaluate a mathematical expression
free Check the machine's memory (RAM) usage
hack Hack the current machine
help [command] Display this help text, or the help text for a command
home Connect to home computer
hostname Displays the hostname of the machine
ifconfig Displays the IP address of the machine
kill [script/pid] [args...] Stops the specified script on the current server
killall Stops all running scripts on the current machine
ls [dir] [| grep pattern] Displays all files on the machine
lscpu Displays the number of CPU cores on the machine
mem [script] [-t] [n] Displays the amount of RAM required to run the script
mv [src] [dest] Move/rename a text or script file
nano [file] Text editor - Open up and edit a script or text file
ps Display all scripts that are currently running
rm [file] Delete a file from the server
run [name] [-t] [n] [args...] Execute a program or script
scan Prints all immediately-available network connections
scan-analyze [d] [-a] Prints info for all servers up to d nodes away
scp [file] [server] Copies a file to a destination server
sudov Shows whether you have root access on this computer
tail [script] [args...] Displays dynamic logs for the specified script
theme [preset] | bg txt hlgt Change the color scheme of the UI
top Displays all running scripts and their RAM usage
unalias [alias name] Deletes the specified alias
wget [url] [target file] Retrieves code/text from a web server
",r={alias:"alias [-g] [name=\"value\"]
Create or display aliases. An alias enables a replacement of a word with another string. It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following:

alias nuke=\"run NUKE.exe\"

Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For example, if the following alias was set:

alias worm=\"HTTPWorm.exe\"

and then you tried to run the following terminal command:

run worm

This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag:

alias -g worm=\"HTTPWorm.exe\"

Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command.

Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal.

The 'unalias' command can be used to remove aliases.

",analyze:"analze
Prints details and statistics about the current server. The information that is printed includes basic server details such as the hostname, whether the player has root access, what ports are opened/closed, and also hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is available on the server, etc.",backdoor:"backdoor
Install a backdoor on the current machine, grants a secret bonus depending on the machine.
Requires root access to run.
",buy:"buy [-l / program]
Purchase a program through the Dark Web. Requires a TOR router to use.

If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the dark web to the Terminal, as well as their costs.

Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.",cat:"cat [file]
Display message (.msg), literature (.lit), or text (.txt) files. Examples:

cat j1.msg
cat foo.lit
cat servers.txt",cd:"cd [dir]
Change to the specified directory. Note that this works even for directories that don't exist. If you change to a directory that does not exist, it will not be 'created'. Examples:

cd scripts/hacking
cd /logs
cd ../",check:"check [script name] [args...]
Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by a space. Remember that a running script is uniquely identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 2 foodnstuff

Then to run the 'check' command on this script you would have to pass the same arguments in:

check foo.script 1 2 foodnstuff",clear:"clear
Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",cls:"cls
Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",connect:"connect [hostname/ip]
Connect to a remote server. The hostname or IP address of the remote server must be given as the argument to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To see which servers can be connected to, use the 'scan' command.",download:"download [script/text file]
Downloads a script or text file to your computer (like your real life computer).
You can also download all of your scripts/text files as a zip file using the following Terminal commands:

Download all scripts and text files: download *
Download all scripts: download *.script
Download all text files: download *.txt
",expr:"expr [mathematical expression]
Evaluate a simple mathematical expression. Supports native JavaScript operators:
+, -, /, *, **, %
Example:
expr 25 * 2 ** 10
Note that letters (non-digits) are not allowed and will be removed from the input.",free:"free
Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as how much of it is being used.",hack:"hack
Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics
",help:"help [command]
Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print more detailed information about the Terminal command. Examples:

help alias
help scan-analyze",home:"home
Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname
Prints the hostname of the current server",ifconfig:"ipconfig
Prints the IP address of the current server",kill:"kill [script name] [args...]
kill [pid]
Kill the script specified by the script name and arguments OR by its PID.

If you are killing the script using its filename and arguments, then each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 sigma-cosmetics

Then to kill this script the same arguments would have to be used:

kill foo.script 1 sigma-cosmetics

If you are killing the script using its PID, then the PID argument must be numeric",killall:"killall
Kills all scripts on the current server. Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. The script will not be stopped/killed until after that time has elapsed.",ls:"ls [dir] [| grep pattern]
The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. The files will be displayed in alphabetical order.

The 'dir' optional parameter can be used to display files/directories in another directory.

The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.

Examples:

List all files with the '.script' extension in the current directory:
ls | grep .script

List all files with the '.js' extension in the root directory:
ls / | grep .js

List all files with the word 'purchase' in the filename, in the 'scripts' directory:
ls scripts | grep purchase",lscpu:"lscpu
Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]
Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then an argument for the number of threads must be passed in afterwards. Examples:

mem foo.script
mem foo.script -t 50
The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example above will print the amount of RAM needed to run 'foo.script' with 50 threads.",mv:"mv [src] [dest]
Move the source file to the specified destination. This can also be used to rename files. This command only works for scripts and text files (.txt). This command CANNOT be used to convert to different file types

Note that, unlike the Linux 'mv' command, the destination argument must be the full filepath. Examples:

mv hacking-controller.script scripts/hacking-controller.script
mv myScript.js myOldScript.js",nano:"nano [file name]
Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be edited using the Text Editor. If the file does not already exist, then a new, empty one will be created",ps:"ps
Prints all scripts that are running on the current server",rm:"rm [file]
Removes the specified file from the current server. A file can be a script, a program, or a message file.

WARNING: This is permanent and cannot be undone",run:"run [file name] [-t] [num threads] [args...]
Execute a program or a script.

The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used to indicate that the script should be run with the specified number of threads. If the flag is omitted, then the script will be run with a single thread by default. If the '-t' flag is used, then it MUST come immediately after the script name, and the [num threads] argument MUST come immediately afterwards.

[args...] represents a variable number of arguments that will be passed into the script. See the documentation about script arguments. Each specified argument must be separated by a space.

",scan:"scan
Prints all immediately-available network connection. This will print a list of all servers that you can currently connect to using the 'connect' Terminal command.","scan-analyze":"scan-analyze [depth] [-a]
Prints detailed information about all servers up to [depth] nodes away on the network. Calling 'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal command. This command also shows the relative paths to reach each server.

By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to 5 and 10, respectively.

The information 'scan-analyze' displays about each server includes whether or not you have root access to it, its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM it has.

By default, this command will not display servers that you have purchased. However, you can pass in the -a flag at the end of the command if you would like to enable that.",scp:"scp [filename] [target server]
Copies the specified file from the current server to the target server. This command only works for script files (.script extension), literature files (.lit extension), and text files (.txt extension). The second argument passed in must be the hostname or IP of the target server.",sudov:"sudov
Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]
Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used to run it. So, if a script was ran with the following arguments:

run foo.script 10 50000

Then in order to check its logs with 'tail' the same arguments must be used:

tail foo.script 10 50000",theme:"theme [preset] | [#background #text #highlight]
Change the color of the game's user interface

This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and must be either 3 or 6 digits. Example:

theme #ffffff #385 #235012

A color picker such as Google's can be used to get your desired hex color values

Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",top:"top
Prints a list of all scripts running on the current server as well as their thread count and how much RAM they are using in total.",unalias:"unalias [alias name]
Deletes the specified alias. Note that the double quotation marks are required.

As an example, if an alias was declared using:

alias r=\"run\"

Then it could be removed using:

unalias r

It is not necessary to differentiate between global and non-global aliases when using 'unalias'",wget:"wget [url] [target file]
Retrieves data from a URL and downloads it to a file on the current server. The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, it will be overwritten by this command.

Note that it will not be possible to download data from many websites because they do not allow cross-origin resource sharing (CORS). Example:

wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt"}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=75},,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(53);function r(e){if(null==e)return null;const t=e.nextPosition;return null==t?null:n.a[t]}},,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(635),i=a(636),o=a(75),s=a(236),l=a(38),c=a(4),u=a(7);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(279),o=a(988);function s(){return(s=Object.assign||function(e){for(var t=1;tr.a.createElement(o.a,s({},e,{classes:{...l(),...e.classes}}))},,,function(e,t,a){"use strict";a.d(t,"b",(function(){return W})),a.d(t,"c",(function(){return U})),a.d(t,"a",(function(){return G}));var n=a(0),r=a.n(n),i=a(687),o=a(59),s=a(688),l=a(4),c=a(17),u=a(124),m=a(49),h=a(75),p=a(18),d=a(6),g=a(2),f=a(20),y=a(7),_=a(130),b=a(71),E=a(60),v=a(30),k=a(57),C=a(154),O=a(240),S=a(123),w=a(142),T=a(140),M=a(79),x=a(375),P=a(10),A=a(120),R=a(265),D=a(689),I=a(690),N=a(691),j=a(31),L=a(143);const B={container:null,docButton:null,faqButton:null,info:null,sleeveList:null,sleeves:null};let F;function W(e){if(f.b.isOn(f.a.Sleeves))try{F=e,B.container=Object(v.a)("div",{class:"generic-menupage-container",id:"sleeves-container",position:"fixed"}),B.info=Object(v.a)("p",{class:"sleeves-page-info",innerHTML:"

Sleeves

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.

Sleeves can be used to perform different tasks synchronously.

"}),B.faqButton=Object(v.a)("button",{class:"std-button",display:"inline-block",innerText:"FAQ",clickListener:()=>{Object(y.a)(s.a,!1)}}),B.docButton=Object(v.a)("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves",innerText:"Documentation",target:"_blank"}),B.sleeveList=Object(v.a)("ul"),B.sleeves=[];for(const t of e.sleeves){const a=H(t,e.sleeves);if(null==a.container)throw new Error("sleeveUi.container is null in createSleevesPage()");B.sleeveList.appendChild(a.container),B.sleeves.push(a)}B.container.appendChild(B.info),B.container.appendChild(B.faqButton),B.container.appendChild(B.docButton),B.container.appendChild(B.sleeveList);const t=document.getElementById("entire-game-container");if(null===t)throw new Error("entire-game-container not found in createSleevesPage()");t.appendChild(B.container)}catch(e){Object(b.a)(e)}}function U(){if(f.b.isOn(f.a.Sleeves)){if(null===F)throw new Error("playerRef is null in updateSleevesPage()");if(null===B.sleeves)throw new Error("UIElems.sleeves is null in updateSleevesPage()");try{for(let e=0;e{Object(y.a)(Object(I.a)(e))}}),a.travelButton=Object(v.a)("button",{class:"std-button",innerText:"Travel",clickListener:()=>{if(null===F)return;const n="sleeve-travel-popup",i=[];i.push(Object(O.a)(n,{class:"std-button"})),i.push(Object(v.a)("p",{innerHTML:`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 ${Object(L.renderToStaticMarkup)(r.a.createElement(P.a,{money:l.a.TravelCost,player:F}))}. It will also CANCEL the sleeve's current task (setting it to idle)`}));for(const r in h.a)e.city!==r&&function(e,r){i.push(Object(v.a)("div",{class:"cmpy-mgmt-find-employee-option",innerText:r,clickListener:()=>{if(null==F)throw new Error("playerRef is null in popupArguments.click()");return F.canAfford(l.a.TravelCost)?(e.city=r,F.loseMoney(l.a.TravelCost),e.resetTaskStatus(),Object(M.a)(n),K(e,a),z(e,a,t),!1):(Object(y.a)("You cannot afford to have this sleeve travel to another city",!1),!1)}}))}(e,r);Object(C.a)(n,i)}}),a.purchaseAugsButton=Object(v.a)("button",{class:"std-button",display:"block",innerText:"Manage Augmentations",clickListener:()=>{if(null==F)throw new Error("playerRef is null in purchaseAugsButton.click()");Object(i.a)(e,F)}}),a.statsPanel.appendChild(a.stats),a.statsPanel.appendChild(a.moreStatsButton),a.statsPanel.appendChild(a.travelButton),e.shock>=100&&a.statsPanel.appendChild(a.purchaseAugsButton),a.taskPanel=Object(v.a)("div",{class:"sleeve-panel",width:"40%"}),a.taskSelector=Object(v.a)("select",{class:"dropdown"}),a.taskSelector.add(Object(k.a)("------")),a.taskSelector.add(Object(k.a)("Work for Company")),a.taskSelector.add(Object(k.a)("Work for Faction")),a.taskSelector.add(Object(k.a)("Commit Crime")),a.taskSelector.add(Object(k.a)("Take University Course")),a.taskSelector.add(Object(k.a)("Workout at Gym")),a.taskSelector.add(Object(k.a)("Shock Recovery")),a.taskSelector.add(Object(k.a)("Synchronize")),a.taskDetailsSelector=Object(v.a)("select",{class:"dropdown"}),a.taskDetailsSelector2=Object(v.a)("select",{class:"dropdown"}),a.taskDescription=Object(v.a)("p"),a.taskProgressBar=Object(v.a)("p"),a.taskSelector.addEventListener("change",()=>{z(e,a,t)}),a.taskSelector.selectedIndex=e.currentTask,a.taskSelector.dispatchEvent(new Event("change")),Y(e,a),a.taskSetButton=Object(v.a)("button",{class:"std-button",innerText:"Set Task",clickListener:()=>{!function(e,t){try{if(null==F)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");if(null==t.taskDescription)throw new Error("elems.taskDescription is null");const a=Object(S.b)(t.taskSelector),n=Object(S.b)(t.taskDetailsSelector),r=Object(S.b)(t.taskDetailsSelector2);let i=!1;switch(a){case"------":t.taskDescription.innerText="This sleeve is currently idle";break;case"Work for Company":i=e.workForCompany(F,n);break;case"Work for Faction":i=e.workForFaction(F,n,r);break;case"Commit Crime":i=e.commitCrime(F,n);break;case"Take University Course":i=e.takeUniversityCourse(F,r,n);break;case"Workout at Gym":i=e.workoutAtGym(F,r,n);break;case"Shock Recovery":e.currentTask=o.a.Recovery,i=e.shockRecovery(F);break;case"Synchronize":i=e.synchronize(F);break;default:console.error("Invalid/Unrecognized taskValue in setSleeveTask(): "+a)}if(i)Y(e,t);else switch(a){case"Work for Faction":t.taskDescription.innerText="Failed to assign sleeve to task. This is most likely because the selected faction does not offer the selected work type.";break;default:t.taskDescription.innerText="Failed to assign sleeve to task. Invalid choice(s)."}if(f.b.isOn(f.a.Sleeves)){if(U(),null==B.sleeves)throw new Error("UIElems.sleeves is null");for(const e of B.sleeves){if(null==e.taskSelector)throw new Error("e.taskSelector is null");e.taskSelector.dispatchEvent(new Event("change"))}}}catch(e){return console.error("Exception caught in setSleeveTask(): "+e),Object(b.a)(e),!1}}(e,a)}}),a.taskPanel.appendChild(a.taskSelector),a.taskPanel.appendChild(a.taskDetailsSelector),a.taskPanel.appendChild(a.taskDetailsSelector2),a.taskPanel.appendChild(a.taskSetButton),a.taskPanel.appendChild(a.taskDescription),a.taskPanel.appendChild(a.taskProgressBar),a.earningsPanel=Object(v.a)("div",{class:"sleeve-panel",width:"35%"}),a.currentEarningsInfo=Object(v.a)("div"),a.totalEarningsButton=Object(v.a)("button",{class:"std-button",innerText:"More Earnings Info",clickListener:()=>{Object(y.a)(Object(N.a)(e))}}),a.earningsPanel.appendChild(a.currentEarningsInfo),a.earningsPanel.appendChild(a.totalEarningsButton),K(e,a),a.container.appendChild(a.statsPanel),a.container.appendChild(a.taskPanel),a.container.appendChild(a.earningsPanel),a):a}function K(e,t){if(f.b.isOn(f.a.Sleeves)){if(null==F)throw new Error("playerRef is null in updateSleeveUi()");if(null==t.taskProgressBar)throw new Error("elems.taskProgressBar is null");if(null==t.stats)throw new Error("elems.stats is null");if(null==t.currentEarningsInfo)throw new Error("elems.currentEarningsInfo is null");if(j.render(Object(D.a)(e),t.stats),e.currentTask===o.a.Crime){const a=[["Money",r.a.createElement(P.a,{money:parseFloat(e.currentTaskLocation)}),"(on success)"],["Hacking Exp",g.a.formatExp(e.gainRatesForTask.hack),"(2x on success)"],["Strength Exp",g.a.formatExp(e.gainRatesForTask.str),"(2x on success)"],["Defense Exp",g.a.formatExp(e.gainRatesForTask.def),"(2x on success)"],["Dexterity Exp",g.a.formatExp(e.gainRatesForTask.dex),"(2x on success)"],["Agility Exp",g.a.formatExp(e.gainRatesForTask.agi),"(2x on success)"],["Charisma Exp",g.a.formatExp(e.gainRatesForTask.cha),"(2x on success)"]];j.render(Object(x.a)("Earnings (Pre-Synchronization)",a),t.currentEarningsInfo),t.taskProgressBar.innerText=Object(_.a)({progress:e.currentTaskTime/e.currentTaskMaxTime,totalTicks:25})}else{const a=[["Money:",Object(A.a)(5*e.gainRatesForTask.money)],["Hacking Exp:",g.a.formatExp(5*e.gainRatesForTask.hack)+" / s"],["Strength Exp:",g.a.formatExp(5*e.gainRatesForTask.str)+" / s"],["Defense Exp:",g.a.formatExp(5*e.gainRatesForTask.def)+" / s"],["Dexterity Exp:",g.a.formatExp(5*e.gainRatesForTask.dex)+" / s"],["Agility Exp:",g.a.formatExp(5*e.gainRatesForTask.agi)+" / s"],["Charisma Exp:",g.a.formatExp(5*e.gainRatesForTask.cha)+" / s"]];if(e.currentTask===o.a.Company||e.currentTask===o.a.Faction){const t=e.getRepGain(F);a.push(["Reputation:",Object(R.a)(5*t)])}j.render(Object(x.a)("Earnings (Pre-Synchronization)",a),t.currentEarningsInfo),t.taskProgressBar.innerText=""}}}const q=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],$=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function z(e,t,a){if(null==F)throw new Error("playerRef is null in updateSleeveTaskSelector()");const n=[];for(const t of a)e!==t&&t.currentTask===o.a.Company&&n.push(t.currentTaskLocation);const r=[];for(const t of a)e!==t&&t.currentTask===o.a.Faction&&r.push(t.currentTaskLocation);if(null===t.taskDetailsSelector)throw new Error("elems.taskDetailsSelector is null");if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector is null");Object(w.a)(t.taskDetailsSelector),Object(w.a)(t.taskDetailsSelector2),t.taskDetailsSelector2=Object(E.a)(t.taskDetailsSelector2);switch(Object(S.b)(t.taskSelector)){case"Work for Company":{let a=0;const r=Object.keys(F.jobs);for(let i=0;i{if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector2 is null");const a=Object(S.b)(t.taskDetailsSelector),n=c.a[a];if(null==n)return void console.warn("Invalid faction name when trying to update Sleeve Task Selector: "+a);const r=n.getInfo();Object(w.a)(t.taskDetailsSelector2);let i=0;r.offerHackingWork&&(t.taskDetailsSelector2.add(Object(k.a)("Hacking Contracts")),e.factionWorkType===u.a.Hacking&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerFieldWork&&(t.taskDetailsSelector2.add(Object(k.a)("Field Work")),e.factionWorkType===u.a.Field&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerSecurityWork&&(t.taskDetailsSelector2.add(Object(k.a)("Security Work")),e.factionWorkType===u.a.Security&&(t.taskDetailsSelector2.selectedIndex=i),++i)}),t.taskDetailsSelector.dispatchEvent(new Event("change"));break}case"Commit Crime":{let a=0;for(const n in m.a){const r=m.a[n].name;if(t.taskDetailsSelector.add(Object(k.a)(r,n)),""===e.crimeType)continue;const i=m.a[e.crimeType];null!==i&&(r===i.name&&(t.taskDetailsSelector.selectedIndex=a),++a)}t.taskDetailsSelector2.add(Object(k.a)("------"));break}case"Take University Course":for(let a=0;aObject(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 r}));var n=a(4);function r(e,t){return e/n.a.DonateMoneyToRepDivisor*t.faction_rep_mult}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(4),r=a(146),i=a(28),o=a(7),s=a(12);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="",t=1){l(this,"cores",1),l(this,"level",1),l(this,"moneyGainRatePerSecond",0),l(this,"onlineTimeSeconds",0),l(this,"ram",1),l(this,"totalMoneyGenerated",0),this.name=e,this.updateMoneyGainRate(t)}calculateCoreUpgradeCost(e=1,t){return Object(r.a)(this.cores,e,t)}calculateLevelUpgradeCost(e=1,t){return Object(r.b)(this.level,e,t)}calculateRamUpgradeCost(e=1,t){return Object(r.e)(this.ram,e,t)}process(e=1){const t=e*n.a.MilliPerCycle/1e3;let a=this.moneyGainRatePerSecond*t;return isNaN(a)&&(console.error(`Hacknet Node ${this.name} calculated earnings of NaN`),a=0),this.totalMoneyGenerated+=a,this.onlineTimeSeconds+=t,a}upgradeCore(e=1,t){this.cores=Math.min(i.a.MaxCores,Math.round(this.cores+e)),this.updateMoneyGainRate(t)}upgradeLevel(e=1,t){this.level=Math.min(i.a.MaxLevel,Math.round(this.level+e)),this.updateMoneyGainRate(t)}upgradeRam(e=1,t){for(let t=0;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(279),o=a(707);function s(){return(s=Object.assign||function(e){for(var t=1;tr.a.createElement(o.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 getAugmentationPrereq(name: string): string[];\n getAugmentationCost(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(17),r=a(32);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 r}));var n=a(0);function r(e,t){return n.createElement(n.Fragment,null,n.createElement("pre",null,e),n.createElement("table",null,n.createElement("tbody",null,t.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,"b",(function(){return b})),a.d(t,"a",(function(){return E}));var n=a(377),r=a(15),i=a(2),o=a(10),s=a(20),l=a(7),c=a(71),u=a(30),m=a(57),h=a(123),p=a(142),d=a(140),g=a(0),f=a(143);const y={container:null,info:null,sortTag:null,sortSelector:null,resleeveList:null,resleeves:null};let _;function b(e){if(s.b.isOn(s.a.Resleeves))try{let t;_=e,y.container=Object(u.a)("div",{class:"generic-menupage-container",id:"resleeves-container",position:"fixed"}),y.info=Object(u.a)("p",{display:"block",innerHTML:"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!

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

NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.",width:"75%"}),0===e.resleeves.length&&(e.resleeves=Object(n.a)()),y.sortTag=Object(u.a)("p",{display:"inline-block",innerText:"Sort By: "}),y.sortSelector=Object(u.a)("select",{class:"dropdown"}),function(e){e.Cost="Cost",e.Hacking="Hacking",e.Strength="Strength",e.Defense="Defense",e.Dexterity="Dexterity",e.Agility="Agility",e.Charisma="Charisma",e.AverageCombatStats="AverageCombat",e.AverageAllStats="AverageAllStats",e.TotalNumAugmentations="TotalNumAugmentations"}(t||(t={})),y.sortSelector.add(Object(m.a)("Cost",t.Cost)),y.sortSelector.add(Object(m.a)("Hacking Level",t.Hacking)),y.sortSelector.add(Object(m.a)("Strength Level",t.Strength)),y.sortSelector.add(Object(m.a)("Defense Level",t.Defense)),y.sortSelector.add(Object(m.a)("Dexterity Level",t.Dexterity)),y.sortSelector.add(Object(m.a)("Agility Level",t.Agility)),y.sortSelector.add(Object(m.a)("Charisma Level",t.Charisma)),y.sortSelector.add(Object(m.a)("Average Combat Stats",t.AverageCombatStats)),y.sortSelector.add(Object(m.a)("Average Stats",t.AverageAllStats)),y.sortSelector.add(Object(m.a)("Number of Augmentations",t.TotalNumAugmentations)),y.resleeveList=Object(u.a)("ul"),y.sortSelector.onchange=()=>{function a(...e){let t=0;for(let a=0;ae.hacking_skill-t.hacking_skill);break;case t.Strength:e.resleeves.sort((e,t)=>e.strength-t.strength);break;case t.Defense:e.resleeves.sort((e,t)=>e.defense-t.defense);break;case t.Dexterity:e.resleeves.sort((e,t)=>e.dexterity-t.dexterity);break;case t.Agility:e.resleeves.sort((e,t)=>e.agility-t.agility);break;case t.Charisma:e.resleeves.sort((e,t)=>e.charisma-t.charisma);break;case t.AverageCombatStats:e.resleeves.sort((e,t)=>a(e.strength,e.defense,e.dexterity,e.agility)-a(t.strength,t.defense,t.dexterity,t.agility));break;case t.AverageAllStats:e.resleeves.sort((e,t)=>a(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-a(t.hacking_skill,t.strength,t.defense,t.dexterity,t.agility,t.charisma));break;case t.TotalNumAugmentations:e.resleeves.sort((e,t)=>e.augmentations.length-t.augmentations.length);break;case t.Cost:default:e.resleeves.sort((e,t)=>e.getCost()-t.getCost())}if(null==y.resleeveList)throw new Error("UIElems.resleeveList is null in sortSelector.click()");if(null==y.resleeves)throw new Error("UIElems.resleeves is null in sortSelector.click()");for(const t of e.resleeves){const e=v(t);if(null==e.container)throw new Error("resleeveUi.container is null in sortSelector.click()");y.resleeveList.appendChild(e.container),y.resleeves.push(e)}},y.sortSelector.dispatchEvent(new Event("change")),y.container.appendChild(y.info),y.container.appendChild(Object(u.a)("br")),y.container.appendChild(y.sortTag),y.container.appendChild(y.sortSelector),y.container.appendChild(y.resleeveList);const a=document.getElementById("entire-game-container");if(null==a)throw new Error("Could not find entire-game-container in createResleevesPage()");a.appendChild(y.container)}catch(e){Object(c.a)(e)}}function E(){y.container instanceof HTMLElement&&Object(d.a)(y.container);for(const e in y)y[e]=null;_=null}function v(e){const t={container:null,statsPanel:null,stats:null,multipliersButton:null,augPanel:null,augSelector:null,augDescription:null,costPanel:null,costText:null,buyButton:null};if(null===_)return t;if(!s.b.isOn(s.a.Resleeves))return t;t.container=Object(u.a)("div",{class:"resleeve-container",display:"block"}),t.statsPanel=Object(u.a)("div",{class:"resleeve-panel",width:"30%"}),t.stats=Object(u.a)("p",{class:"resleeve-stats-text",innerHTML:`Hacking: ${i.a.formatSkill(e.hacking_skill)} (${i.a.formatExp(e.hacking_exp)} exp)
Strength: ${i.a.formatSkill(e.strength)} (${i.a.formatExp(e.strength_exp)} exp)
Defense: ${i.a.formatSkill(e.defense)} (${i.a.formatExp(e.defense_exp)} exp)
Dexterity: ${i.a.formatSkill(e.dexterity)} (${i.a.formatExp(e.dexterity_exp)} exp)
Agility: ${i.a.formatSkill(e.agility)} (${i.a.formatExp(e.agility_exp)} exp)
Charisma: ${i.a.formatSkill(e.charisma)} (${i.a.formatExp(e.charisma_exp)} exp)
# Augmentations: `+e.augmentations.length}),t.multipliersButton=Object(u.a)("button",{class:"std-button",innerText:"Multipliers",clickListener:()=>{Object(l.a)(["

Total Multipliers:

","Hacking Level multiplier: "+i.a.formatPercentage(e.hacking_mult),"Hacking Experience multiplier: "+i.a.formatPercentage(e.hacking_exp_mult),"Strength Level multiplier: "+i.a.formatPercentage(e.strength_mult),"Strength Experience multiplier: "+i.a.formatPercentage(e.strength_exp_mult),"Defense Level multiplier: "+i.a.formatPercentage(e.defense_mult),"Defense Experience multiplier: "+i.a.formatPercentage(e.defense_exp_mult),"Dexterity Level multiplier: "+i.a.formatPercentage(e.dexterity_mult),"Dexterity Experience multiplier: "+i.a.formatPercentage(e.dexterity_exp_mult),"Agility Level multiplier: "+i.a.formatPercentage(e.agility_mult),"Agility Experience multiplier: "+i.a.formatPercentage(e.agility_exp_mult),"Charisma Level multiplier: "+i.a.formatPercentage(e.charisma_mult),"Charisma Experience multiplier: "+i.a.formatPercentage(e.charisma_exp_mult),"Hacking Chance multiplier: "+i.a.formatPercentage(e.hacking_chance_mult),"Hacking Speed multiplier: "+i.a.formatPercentage(e.hacking_speed_mult),"Hacking Money multiplier: "+i.a.formatPercentage(e.hacking_money_mult),"Hacking Growth multiplier: "+i.a.formatPercentage(e.hacking_grow_mult),"Salary multiplier: "+i.a.formatPercentage(e.work_money_mult),"Company Reputation Gain multiplier: "+i.a.formatPercentage(e.company_rep_mult),"Faction Reputation Gain multiplier: "+i.a.formatPercentage(e.faction_rep_mult),"Crime Money multiplier: "+i.a.formatPercentage(e.crime_money_mult),"Crime Success multiplier: "+i.a.formatPercentage(e.crime_success_mult),"Hacknet Income multiplier: "+i.a.formatPercentage(e.hacknet_node_money_mult),"Hacknet Purchase Cost multiplier: "+i.a.formatPercentage(e.hacknet_node_purchase_cost_mult),"Hacknet Level Upgrade Cost multiplier: "+i.a.formatPercentage(e.hacknet_node_level_cost_mult),"Hacknet Ram Upgrade Cost multiplier: "+i.a.formatPercentage(e.hacknet_node_ram_cost_mult),"Hacknet Core Upgrade Cost multiplier: "+i.a.formatPercentage(e.hacknet_node_core_cost_mult),"Bladeburner Max Stamina multiplier: "+i.a.formatPercentage(e.bladeburner_max_stamina_mult),"Bladeburner Stamina Gain multiplier: "+i.a.formatPercentage(e.bladeburner_stamina_gain_mult),"Bladeburner Field Analysis multiplier: "+i.a.formatPercentage(e.bladeburner_analysis_mult),"Bladeburner Success Chance multiplier: "+i.a.formatPercentage(e.bladeburner_success_chance_mult)].join("
"),!1)}}),t.statsPanel.appendChild(t.stats),t.statsPanel.appendChild(t.multipliersButton),t.augPanel=Object(u.a)("div",{class:"resleeve-panel",width:"50%"}),t.augSelector=Object(u.a)("select",{class:"resleeve-aug-selector dropdown"}),t.augDescription=Object(u.a)("p");for(let a=0;a{!function(e){if(null==e.augDescription)throw new Error("elems.augDescription is null in updateAugDescription()");const t=Object(h.b)(e.augSelector),a=r.a[t];if(null==a)return void console.warn("Could not find Augmentation with name "+t);let n=a.info;"string"!=typeof n&&(n=Object(f.renderToStaticMarkup)(n));e.augDescription.innerHTML=n}(t)}),t.augSelector.dispatchEvent(new Event("change")),t.augPanel.appendChild(t.augSelector),t.augPanel.appendChild(t.augDescription);const a=e.getCost();return t.costPanel=Object(u.a)("div",{class:"resleeve-panel",width:"20%"}),t.costText=Object(u.a)("p",{innerHTML:`It costs ${Object(f.renderToStaticMarkup)(g.createElement(o.a,{money:a,player:_}))} to purchase this Sleeve.`}),t.buyButton=Object(u.a)("button",{class:"std-button",innerText:"Purchase",clickListener:()=>{if(null==_)throw new Error("playerRef is null in buyButton.click()");Object(n.b)(e,_)?Object(l.a)(g.createElement(g.Fragment,null,"You re-sleeved for ",g.createElement(o.a,{money:a}),"!"),!1):Object(l.a)("You cannot afford to re-sleeve into this body",!1)}}),t.costPanel.appendChild(t.costText),t.costPanel.appendChild(t.buyButton),t.container.appendChild(t.statsPanel),t.container.appendChild(t.augPanel),t.container.appendChild(t.costPanel),t}},function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(692),r=a(15),i=a(192),o=a(3),s=a(14);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;e0?"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(435),i=a(547),o=a(548),s=a(550),l=a(27),c=a(105);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(15),o=a(3),s=a(27),l=a(105),c=a(303);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(12);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(e.id)}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(90),r=a(41);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 o}));var n=a(0),r=a.n(n),i=a(440);function o(e){return r.a.createElement("div",null,r.a.createElement(i.a,{corp:e.corp,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(316),o=a(441),s=a(21),l=a(447),c=a(40);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,a]=Object(n.useState)("Overview");return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",null,r.a.createElement(i.a,{current:"Overview"===t,key:"overview",onClick:()=>a("Overview"),text:e.corp.name}),e.corp.divisions.map(e=>r.a.createElement(i.a,{current:e.name===t,key:e.name,onClick:()=>a(e.name),text:e.name})),r.a.createElement(u,{corp:e.corp,setDivisionName:a})),r.a.createElement(l.a,{corp:e.corp,divisionName: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(7),o=a(21),s=a(40),l=a(94);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.e)(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";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={name:"",cost:0,desc:""}){n(this,"name",""),n(this,"cost",0),n(this,"desc",""),n(this,"advertisingMult",1),n(this,"employeeChaMult",1),n(this,"employeeCreMult",1),n(this,"employeeEffMult",1),n(this,"employeeIntMult",1),n(this,"productionMult",1),n(this,"productProductionMult",1),n(this,"salesMult",1),n(this,"sciResearchMult",1),n(this,"storageMult",1),this.name=e.name,this.cost=e.cost,this.desc=e.desc,e.advertisingMult&&(this.advertisingMult=e.advertisingMult),e.employeeChaMult&&(this.employeeChaMult=e.employeeChaMult),e.employeeCreMult&&(this.employeeCreMult=e.employeeCreMult),e.employeeEffMult&&(this.employeeEffMult=e.employeeEffMult),e.employeeIntMult&&(this.employeeIntMult=e.employeeIntMult),e.productionMult&&(this.productionMult=e.productionMult),e.productProductionMult&&(this.productProductionMult=e.productProductionMult),e.salesMult&&(this.salesMult=e.salesMult),e.sciResearchMult&&(this.sciResearchMult=e.sciResearchMult),e.storageMult&&(this.storageMult=e.storageMult)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=[{name:"AutoBrew",cost:12e3,desc:"Automatically keep your employees fully caffeinated with coffee injections. This research will keep the energy of all employees at its maximum possible value, for no cost. This will also disable the Coffee upgrade."},{name:"AutoPartyManager",cost:15e3,desc:"Automatically analyzes your employees' happiness and morale and boosts them whenever it detects a decrease. This research will keep the morale and happiness of all employees at their maximum possible values, for no cost. This will also disable the 'Throw Party' feature."},{name:"Automatic Drug Administration",cost:1e4,desc:"Research how to automatically administer performance-enhacing drugs to all of your employees. This unlocks Drug-related Research."},{name:"Bulk Purchasing",cost:5e3,desc:"Research the art of buying materials in bulk. This allows you to purchase any amount of a material instantly."},{name:"CPH4 Injections",cost:25e3,desc:"Develop an advanced and harmless synthetic drug that is administered to employees to increase all of their stats, except experience, by 10%.",employeeCreMult:1.1,employeeChaMult:1.1,employeeEffMult:1.1,employeeIntMult:1.1},{name:"Drones",cost:5e3,desc:"Acquire the knowledge needed to create advanced drones. This research does nothing by itself, but unlocks other Drone-related research."},{name:"Drones - Assembly",cost:25e3,desc:"Manufacture and use Assembly Drones to improve the efficiency of your production lines. This increases all production by 20%.",productionMult:1.2},{name:"Drones - Transport",cost:3e4,desc:"Manufacture and use intelligent Transport Drones to optimize your warehouses. This increases the storage space of all warehouses by 50%.",storageMult:1.5},{name:"Go-Juice",cost:25e3,desc:"Provide employees with Go-Juice, a coffee-derivative that further enhances the brain's dopamine production. This increases the maximum energy of all employees by 10."},{name:"Hi-Tech R&D Laboratory",cost:5e3,desc:"Construct a cutting edge facility dedicated to advanced research and and development. This allows you to spend Scientific Research on powerful upgrades. It also globally increases Scientific Research production by 10%.",sciResearchMult:1.1},{name:"HRBuddy-Recruitment",cost:15e3,desc:"Use automated software to handle the hiring of employees. With this research, each office will automatically hire one employee per market cycle if there is available space."},{name:"HRBuddy-Training",cost:2e4,desc:"Use automated software to handle the training of employees. With this research, each employee hired with HRBuddy-Recruitment will automatically be assigned to 'Training', rather than being unassigned."},{name:"JoyWire",cost:2e4,desc:"A brain implant which is installed in employees, increasing their maximum happiness by 10."},{name:"Market-TA.I",cost:2e4,desc:"Develop advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know what price to sell your Materials/Products at in order to avoid losing sales due to having too high of a mark-up. It also lets you automatically use that sale price."},{name:"Market-TA.II",cost:5e4,desc:"Develop double-advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know how many sales of a Material/Product you lose or gain from having too high or too low or a sale price. It also lets you automatically set the sale price of your Materials/Products at the optimal price such that the amount sold matches the amount produced."},{name:"Overclock",cost:15e3,desc:"Equip employees with a headset that uses transcranial direct current stimulation (tDCS) to increase the speed of their neurotransmitters. This research increases the intelligence and efficiency of all employees by 25%.",employeeEffMult:1.25,employeeIntMult:1.25},{name:"Self-Correcting Assemblers",cost:25e3,desc:"Create assemblers that can be used for universal production. These assemblers use deep learning to improve their efficiency at their tasks. This research increases all production by 10%",productionMult:1.1},{name:"Sti.mu",cost:3e4,desc:"Upgrade the tDCS headset to stimulate regions of the brain that control confidence and enthusiasm. This research increases the max morale of all employees by 10."},{name:"sudo.Assist",cost:15e3,desc:"Develop a virtual assistant AI to handle and manage administrative issues for your corporation."},{name:"uPgrade: Capacity.I",cost:2e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 3 to 4)."},{name:"uPgrade: Capacity.II",cost:3e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 4 to 5)."},{name:"uPgrade: Dashboard",cost:5e3,desc:"Improve the software used to manage the industry's production line for its various products. This allows you to manage the production and sale of a product before it's finished being designed."},{name:"uPgrade: Fulcrum",cost:1e4,desc:"Streamline the manufacturing of this industry's various products. This research increases the production of your products by 5%",productProductionMult:1.05}]},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return Industry}));var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(12),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(18),decimal_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(63),_IndustryData__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(40),_data_Constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(29),_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(35),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(100),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(14),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(445),_OfficeSpace__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(203),_Product__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(217),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(7),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(67),_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(107),_Warehouse__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(144),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(258),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(11);function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class Industry{constructor(e={}){_defineProperty(this,"name",""),_defineProperty(this,"type",_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture),_defineProperty(this,"sciResearch",new _Material__WEBPACK_IMPORTED_MODULE_6__.a({name:"Scientific Research"})),_defineProperty(this,"researched",{}),_defineProperty(this,"reqMats",{}),_defineProperty(this,"prodMats",[]),_defineProperty(this,"products",{}),_defineProperty(this,"makesProducts",!1),_defineProperty(this,"awareness",0),_defineProperty(this,"popularity",0),_defineProperty(this,"startingCost",0),_defineProperty(this,"reFac",0),_defineProperty(this,"sciFac",0),_defineProperty(this,"hwFac",0),_defineProperty(this,"robFac",0),_defineProperty(this,"aiFac",0),_defineProperty(this,"advFac",0),_defineProperty(this,"prodMult",0),_defineProperty(this,"upgrades",Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__.a).length).fill(0)),_defineProperty(this,"state","START"),_defineProperty(this,"newInd",!0),_defineProperty(this,"offices",{[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0}),this.name=e.name?e.name:"",this.type=e.type?e.type:_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0},this.init()}init(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.d[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);switch(this.startingCost=e,this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error("Invalid Industry Type passed into Industry.init(): "+this.type)}}getProductDescriptionText(){if(!this.makesProducts)return"";switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}}getMaximumNumberProducts(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.BaseMaxProducts+e}hasMaximumNumberProducts(){return Object.keys(this.products).length>=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(40);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 l}));var n=a(0),r=a.n(n),i=a(448),o=a(469),s=a(18);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,{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(355),o=a(449),s=a(21),l=a(450);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,{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(29),o=a(21),s=a(7),l=a(94),c=a(74);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.d)(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(451),o=a(455),s=a(459);function l(e){return r.a.createElement("div",null,r.a.createElement("div",{className:"cmpy-mgmt-industry-left-panel"},r.a.createElement(o.a,{player:e.player,corp:e.corp,division:e.division,currentCity:e.city,office:e.office}),r.a.createElement(i.a,{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,{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 _}));var n=a(0),r=a.n(n),i=a(35),o=a(2),s=a(123),l=a(21),c=a(452),u=a(453),m=a(454),h=a(10);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 g(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.corp.rerender(e.player))}},"+"),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.corp.rerender(e.player)}},"-"),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(f,{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(f,{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(f,{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(f,{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(f,{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(f,{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 _(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,{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.corp.rerender(e.player))},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,{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(g,{corp:e.corp,division:e.division,office:e.office,player:e.player}):r.a.createElement(y,{corp:e.corp,division:e.division,office:e.office,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(21),o=a(2),s=a(7),l=a(29);function c(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 c=l.a.OfficeInitialCost*n,u=e.corp.funds.dividedBy(l.a.OfficeInitialCost).toNumber();let m=1;for(n=Math.pow(1.09,t);m<50&&!(n>=u);){const e=Math.pow(1.09,t+m);if(n+e>u)break;n+=e,++m}const h=l.a.OfficeInitialCost*n;function p(t,a){e.corp.funds.lt(t)?Object(s.a)("You don't have enough company funds to purchase this upgrade!"):(e.office.size+=a,e.corp.funds=e.corp.funds.minus(t),Object(s.a)("Office space increased! It can now hold "+e.office.size+" employees"),e.corp.rerender(e.player)),Object(i.b)(e.popupId)}function d(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:()=>p(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(d,{corp:e.corp,cost:a,size:l.a.OfficeInitialSize}),r.a.createElement(d,{corp:e.corp,cost:c,size:5*l.a.OfficeInitialSize}),r.a.createElement(d,{corp:e.corp,cost:h,size:m*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(21),o=a(2),s=a(29),l=a(14),c=a(11),u=a(242),m=a(7);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.corp.rerender(e.player))}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(7),o=a(21),s=a(40),l=a(217);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,g]=Object(n.useState)(null);if(e.division.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);function f(){let t=h,n=d;if((null==t||t<0)&&(t=0),(null==n||n<0)&&(n=0),null==u||""===u)Object(i.a)("You must specify a name for your product!");else if(isNaN(t))Object(i.a)("Invalid value for design investment");else if(isNaN(n))Object(i.a)("Invalid value for marketing investment");else if(e.corp.funds.lt(t+n))Object(i.a)("You don't have enough company funds to make this large of an investment");else{const r=new l.a({name:u.replace(/[<>]/g,""),createCity:a,designCost:t,advCost:n});if(e.division.products[r.name]instanceof l.a)return void Object(i.a)("You already have a product with this name!");e.corp.funds=e.corp.funds.minus(t+n),e.division.products[r.name]=r,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?g(null):g(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&f()},type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Marketing investment"}),r.a.createElement("button",{className:"std-button",onClick:f},"Develop Product"));var y}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(7),o=a(30),s=a(21),l=a(40),c=a(29),u=a(202),m=a(458);function h(e){return Object(n.useEffect)(()=>{{const t=document.getElementById(e.popupId+"-content");null!=t&&(t.style.minHeight="80vh")}const t=l.c[e.industry.type];if(void 0===t)return;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(m.Treant)(a);const n=t.getAllNodes();for(let a=0;a{e.industry.sciResearch.qty>=r.cost?(e.industry.sciResearch.qty-=r.cost,t.research(n[a]),e.industry.researched[n[a]]=!0,Object(i.a)(`Researched ${n[a]}. It may take a market cycle (~${c.a.SecsPerMarketCycle} seconds) before the effects of the Research apply.`),Object(s.b)(e.popupId)):Object(i.a)("You do not have enough Scientific Research for "+r.name)}):console.warn("Could not find Research Tree div for "+o)}const r=document.getElementById(e.popupId+"-content");null!=r&&r.appendChild(Object(o.a)("pre",{display:"block",innerText:`Multipliers from research:\n * Advertising Multiplier: x${t.getAdvertisingMultiplier()}\n * Employee Charisma Multiplier: x${t.getEmployeeChaMultiplier()}\n * Employee Creativity Multiplier: x${t.getEmployeeCreMultiplier()}\n * Employee Efficiency Multiplier: x${t.getEmployeeEffMultiplier()}\n * Employee Intelligence Multiplier: x${t.getEmployeeIntMultiplier()}\n * Production Multiplier: x${t.getProductionMultiplier()}\n * Sales Multiplier: x${t.getSalesMultiplier()}\n * Scientific Research Multiplier: x${t.getScientificResearchMultiplier()}\n * Storage Multiplier: x`+t.getStorageMultiplier()}))}),r.a.createElement("div",{id:e.popupId},r.a.createElement("div",{id:e.popupId+"outer-box"}))}},,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__(29),_OfficeSpace__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(203),_Material__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(100),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(217),_Warehouse__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(144),_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(460),_ExportPopup__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(461),_LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(462),_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(463),_SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(464),_SellProductPopup__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(465),_PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(466),_ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(467),_SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(468),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(2),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(7),_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(21),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(67),_ui_React_Money__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(10),_MoneyCost__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(74),_Helpers__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(289);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_18__.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_19__.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_19__.a,{money:product.pCost+e}))}else if(product.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_18__.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_19__.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_19__.a,{money:product.sCost}));function openSellProductPopup(){const e="cmpy-mgmt-limit-product-production-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_17__.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_17__.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_17__.a)(e,_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__.a,{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_17__.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"))):hasUpgradeDashboard?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,"..."),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),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,"..."),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"))}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_17__.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_17__.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_18__.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_19__.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_19__.a,{money:mat.bCost+markupLimit}));else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_18__.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_19__.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_19__.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_17__.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_17__.a)(e,_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__.a,{mat:mat,industry:division,corp:props.corp,popupId:e})}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},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",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";let r="This Industry uses ["+Object.keys(e.division.reqMats).join(", ")+"] in order to ";e.division.prodMats.length>0?(r+="produce ["+e.division.prodMats.join(", ")+"] ",e.division.makesProducts&&(r+=" and "+e.division.getProductDescriptionText())):e.division.makesProducts&&(r+=e.division.getProductDescriptionText()+".");const i=[];for(const t in e.division.reqMats)if(e.division.reqMats.hasOwnProperty(t)){const a=[" *",e.division.reqMats[t],t].join(" ");i.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:t},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,a)))}let o,s="in order to create ";switch(e.division.prodMats.length>0?(s+="one of each produced Material ("+e.division.prodMats.join(", ")+") ",e.division.makesProducts&&(s+="or to create one of its Products")):e.division.makesProducts&&(s+="one of its Products"),e.division.state){case"START":o="Current state: Preparing...";break;case"PURCHASE":o="Current state: Purchasing materials...";break;case"PRODUCTION":o="Current state: Producing materials and/or products...";break;case"SALE":o="Current state: Selling materials and/or products...";break;case"EXPORT":o="Current state: Exporting materials and/or products...";break;default:console.error("Invalid state: "+e.division.state)}const l=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof _Material__WEBPACK_IMPORTED_MODULE_3__.a&&Object(_Helpers__WEBPACK_IMPORTED_MODULE_21__.a)(t,e.division)&&l.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent,{city:e.currentCity,corp:e.corp,division:e.division,key:t,mat:e.warehouse.materials[t],warehouse:e.warehouse}));const c=[];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&&c.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent,{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.corp.rerender(e.player))}},"Upgrade Warehouse Size -"," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_20__.a,{money:a,corp:e.corp})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,r,". The exact requirements for production are:"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),i,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,s),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,o),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_17__.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")),l,c)}():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,void(e.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_16__.a)("You do not have enough funds to do this!"):(t.warehouses[a]=new _Warehouse__WEBPACK_IMPORTED_MODULE_5__.a({corp:e.corp,industry:t,loc:a,size:_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialSize}),e.corp.funds=e.corp.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost),e.corp.rerender(e.player)));var t,a}},"Purchase Warehouse (",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_20__.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(21);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.corp.rerender(e.player)}},"Discontinue"))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return ExportPopup}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(7),_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(21);function ExportPopup(props){if(0===props.corp.divisions.length)throw new Error("Export popup created with no divisions.");if(0===Object.keys(props.corp.divisions[0].warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[industry,setIndustry]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(props.corp.divisions[0].name),[city,setCity]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(Object.keys(props.corp.divisions[0].warehouses)[0]),[amt,setAmt]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),setRerender=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1)[1];function rerender(){setRerender(e=>!e)}function onCityChange(e){setCity(e.target.value)}function onIndustryChange(e){setIndustry(e.target.value)}function onAmtChange(e){setAmt(e.target.value)}function exportMaterial(){const industryName=industry,cityName=city;let sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");let temp=sanitizedAmt.replace(/MAX/g,"1");try{temp=eval(temp)}catch(e){return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__.a)("Invalid expression entered for export amount: "+e)}const n=parseFloat(temp);if(null==n||isNaN(n)||n<0)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__.a)("Invalid amount entered for export");const exportObj={ind:industryName,city:cityName,amt:sanitizedAmt};props.mat.exp.push(exportObj),Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__.b)(props.popupId)}function removeExport(e){for(let t=0;te.name===industry);return 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("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."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("select",{className:"dropdown",onChange:onIndustryChange,defaultValue:industry},props.corp.divisions.map(e=>react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("option",{key:e.name,value:e.name},e.name))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("select",{className:"dropdown",onChange:onCityChange,defaultValue:city},currentDivision&&Object.keys(currentDivision.warehouses).map(e=>{if(0!==currentDivision.warehouses[e])return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("option",{key:e,value:e},e)})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{className:"text-input",placeholder:"Export amount / s",onChange:onAmtChange}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:exportMaterial},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.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."),props.mat.exp.map((e,t)=>react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:t,className:"cmpy-mgmt-existing-export",onClick:()=>removeExport(e)},"Industry: ",e.ind,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"City: ",e.city,react__WEBPACK_IMPORTED_MODULE_0___default.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(7),o=a(21);function s(e){const[t,a]=Object(n.useState)(null);function s(){if(null===t)return e.product.prdman[e.city][0]=!1,void Object(o.b)(e.popupId);const a=t;isNaN(a)?Object(i.a)("Invalid value entered"):(a<0?e.product.prdman[e.city][0]=!1:(e.product.prdman[e.city][0]=!0,e.product.prdman[e.city][1]=a),Object(o.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(7),o=a(21),s=a(94);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.f)(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(7),o=a(21),s=a(94);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.g)(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(7),o=a(21),s=a(107),l=a(2),c=a(94);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.a)(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(94),o=a(289),s=a(100);function l(e){const[t,a]=Object(n.useState)(!!e.warehouse.smartSupplyUseLeftovers[e.matName]);const i=e.matName+"-use-leftovers";return r.a.createElement("div",{key:e.matName},r.a.createElement("label",{style:{color:"white"},htmlFor:i},e.warehouse.materials[e.matName].name),r.a.createElement("input",{type:"checkbox",id:i,onChange:function(t){e.warehouse.smartSupplyUseLeftovers[e.matName]=t.target.checked,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 s.a&&Object(o.a)(t,e.division)&&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.h)(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";a.d(t,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(470),o=a(471),s=a(472),l=a(473),c=a(474),u=a(475),m=a(476),h=a(477),p=a(478),d=a(29),g=a(255),f=a(256),y=a(4),_=a(2),b=a(11),E=a(21),v=a(10);function k(e){function t(e){let t=e.className?e.className:"std-button";const a=null!=e.tooltip;return a&&(t+=" tooltip"),r.a.createElement("a",{className:t,onClick:e.onClick,style:{display:e.display?e.display:"block"}},e.text,a&&r.a.createElement("span",{className:"tooltiptext"},e.tooltip))}function a(){Object(E.a)("corp-bribe-popup",s.a,{player:e.player,popupId:"corp-bribe-popup",corp:e.corp})}const n=e.corp.revenue.minus(e.corp.expenses).toNumber();function k(e){return e.mult<=1?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,e.name,_.a.format(e.mult,"0.000"),r.a.createElement("br",null))}function C(){const t="cmpy-mgmt-find-investors-popup";Object(E.a)(t,h.a,{player:e.player,popupId:t,corp:e.corp})}function O(){const t="cmpy-mgmt-go-public-popup";Object(E.a)(t,p.a,{player:e.player,popupId:t,corp:e.corp})}function S(){const t="cmpy-mgmt-sell-shares-popup";Object(E.a)(t,l.a,{corp:e.corp,player:e.player,popupId:t})}function w(){const t="corp-buyback-shares-popup";Object(E.a)(t,c.a,{player:e.player,popupId:t,corp:e.corp})}function T(){const t="cmpy-mgmt-issue-new-shares-popup";Object(E.a)(t,m.a,{popupId:t,corp:e.corp})}function M(){const t="cmpy-mgmt-issue-dividends-popup";Object(E.a)(t,u.a,{popupId:t,corp:e.corp})}return r.a.createElement("div",null,r.a.createElement("p",null,"Total Funds: ",r.a.createElement(v.a,{money:e.corp.funds.toNumber()}),r.a.createElement("br",null),"Total Revenue: ",r.a.createElement(v.a,{money:e.corp.revenue.toNumber()})," / s",r.a.createElement("br",null),"Total Expenses: ",r.a.createElement(v.a,{money:e.corp.expenses.toNumber()})," / s",r.a.createElement("br",null),"Total Profits: ",r.a.createElement(v.a,{money:n})," / s",r.a.createElement("br",null),r.a.createElement((function(){if(e.corp.dividendPercentage<=0||n<=0)return r.a.createElement(r.a.Fragment,null);const t=e.corp.dividendPercentage/100*n,a=n-t,i=t/e.corp.totalShares,o=e.corp.numShares*i;return r.a.createElement(r.a.Fragment,null,"Retained Profits (after dividends): ",r.a.createElement(v.a,{money:a})," / s",r.a.createElement("br",null),r.a.createElement("br",null),"Dividend Percentage:"," ",_.a.format(e.corp.dividendPercentage/100,"0%"),r.a.createElement("br",null),"Dividends per share: ",r.a.createElement(v.a,{money:i})," / s",r.a.createElement("br",null),"Your earnings as a shareholder (Pre-Tax):"," ",r.a.createElement(v.a,{money:o})," / s",r.a.createElement("br",null),"Dividend Tax Rate: ",e.corp.dividendTaxPercentage,"%",r.a.createElement("br",null),"Your earnings as a shareholder (Post-Tax):"," ",r.a.createElement(v.a,{money:o*(1-e.corp.dividendTaxPercentage/100)})," ","/ s",r.a.createElement("br",null),r.a.createElement("br",null))}),null),"Publicly Traded: ",e.corp.public?"Yes":"No",r.a.createElement("br",null),"Owned Stock Shares:"," ",_.a.format(e.corp.numShares,"0.000a"),r.a.createElement("br",null),"Stock Price:"," ",e.corp.public?r.a.createElement(v.a,{money:e.corp.sharePrice}):"N/A",r.a.createElement("br",null)),r.a.createElement("p",{className:"tooltip"},"Total Stock Shares:"," ",_.a.format(e.corp.totalShares,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Outstanding Shares:"," ",_.a.format(e.corp.issuedShares,"0.000a"),r.a.createElement("br",null),"Private Shares:"," ",_.a.format(e.corp.totalShares-e.corp.issuedShares-e.corp.numShares,"0.000a"))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(k,{name:"Production Multiplier: ",mult:e.corp.getProductionMultiplier()}),r.a.createElement(k,{name:"Storage Multiplier: ",mult:e.corp.getStorageMultiplier()}),r.a.createElement(k,{name:"Advertising Multiplier: ",mult:e.corp.getAdvertisingMultiplier()}),r.a.createElement(k,{name:"Empl. Creativity Multiplier: ",mult:e.corp.getEmployeeCreMultiplier()}),r.a.createElement(k,{name:"Empl. Charisma Multiplier: ",mult:e.corp.getEmployeeChaMultiplier()}),r.a.createElement(k,{name:"Empl. Intelligence Multiplier: ",mult:e.corp.getEmployeeIntMultiplier()}),r.a.createElement(k,{name:"Empl. Efficiency Multiplier: ",mult:e.corp.getEmployeeEffMultiplier()}),r.a.createElement(k,{name:"Sales Multiplier: ",mult:e.corp.getSalesMultiplier()}),r.a.createElement(k,{name:"Scientific Research Multiplier: ",mult:e.corp.getScientificResearchMultiplier()}),r.a.createElement("br",null),r.a.createElement((function(){const t=e.corp.storedCycles*y.a.MilliPerCycle;return t<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,"Bonus time: ",Object(b.b)(t),r.a.createElement("br",null),r.a.createElement("br",null))}),null),r.a.createElement("div",null,r.a.createElement(t,{className:"a-link-button",display:"inline-block",onClick:()=>e.corp.getStarterGuide(e.player),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.corp.public?r.a.createElement((function(){const a=e.corp,n=a.shareSaleCooldown>0,i=n?"a-link-button-inactive":"std-button",o=n?"Cannot sell shares for "+a.convertCooldownToString(a.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=a.issueNewSharesCooldown>0,l=s?"a-link-button-inactive":"std-button",c=s?"Cannot issue new shares for "+a.convertCooldownToString(a.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.a.createElement(r.a.Fragment,null,r.a.createElement(t,{className:i,display:"inline-block",onClick:S,text:"Sell Shares",tooltip:o}),r.a.createElement(t,{className:"std-button",display:"inline-block",onClick:w,text:"Buyback shares",tooltip:"Buy back shares you that previously issued or sold at market price."}),r.a.createElement("br",null),r.a.createElement(t,{className:l,display:"inline-block",onClick:T,text:"Issue New Shares",tooltip:c}),r.a.createElement(t,{className:"std-button",display:"inline-block",onClick:M,text:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)"}),r.a.createElement("br",null))}),null):r.a.createElement((function(){const a=e.corp.fundingRound<4,n=a?"std-button":"a-link-button-inactive",i=a?"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(t,{className:n,onClick:C,text:"Find Investors",tooltip:i,display:"inline-block"}),r.a.createElement(t,{className:"std-button",onClick:O,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))}),null),r.a.createElement((function(){const n=e.corp.determineValuation()>=d.a.BribeThreshold||!0,i=n?"a-link-button":"a-link-button-inactive";return r.a.createElement(t,{className:i,display:"inline-block",onClick:a,text:"Bribe Factions",tooltip:n?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"})}),null)),r.a.createElement("br",null),r.a.createElement((function(){return e.corp.divisions.length<=0?r.a.createElement(r.a.Fragment,null):r.a.createElement("div",{className:"cmpy-mgmt-upgrade-container"},r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Unlocks "),Object.values(g.a).filter(t=>0===e.corp.unlockUpgrades[t[0]]).map(t=>r.a.createElement(o.a,{player:e.player,corp:e.corp,upgradeData:t,key:t[0]})),r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Upgrades "),e.corp.upgrades.map((e,t)=>f.a[t]).map(t=>r.a.createElement(i.a,{player:e.player,corp:e.corp,upgrade:t,key:t[0]})))}),null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(7),o=a(94),s=a(74);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("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(c)){try{Object(o.c)(e.corp,e.upgrade)}catch(e){Object(i.a)(e+"")}e.corp.rerender(e.player)}}},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(7),o=a(94),s=a(74);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("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(t[1])){try{Object(o.i)(e.corp,e.upgradeData)}catch(e){Object(i.a)(e+"")}e.corp.rerender(e.player)}}},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(17),o=a(29),s=a(2),l=a(21),c=a(7);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(7),s=a(21),l=a(29);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.corp.rerender(e.player)}}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(21),o=a(2),s=a(7);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.corp.rerender(e.player)}}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(21),o=a(7),s=a(29),l=a(94);function c(e){const[t,a]=Object(n.useState)(null);function c(){if(null!==t){try{Object(l.b)(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(7),s=a(21),l=a(14),c=a(29);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(21),o=a(2),s=a(29);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.corp.rerender(e.player),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(7),o=a(21),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.corp.rerender(e.player),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 d}));var n=a(480),r=a(481),i=a(540),o=a(541),s=a(542),l=a(546),c=a(205),u=a(18),m=a(209),h=a(12),p=a(63);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=0,this.corporation=0,this.bladeburner=0,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.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(23);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(104),r=a(44);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 O}));var n=a(16),r=a(6);const i={},o={},s={},l={},c={},u={},m={},h={},p={},d={},g={},f={},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 i=[{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:r(1),time:n.a.MillisecondsPerFiveMinutes}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:r(50),time:2*n.a.MillisecondsPerFiveMinutes}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:r(100),time:n.a.MillisecondsPerHalfHour}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:r(250),time:n.a.MillisecondsPer2Hours}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:r(500),time:n.a.MillisecondsPer4Hours}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:r(750),time:n.a.MillisecondsPer8Hours}},{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:r(75),time:n.a.MillisecondsPerQuarterHour}},{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:r(400),time:n.a.MillisecondsPer2Hours}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:r(75),time:n.a.MillisecondsPerHalfHour}},{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:r(25),time:n.a.MillisecondsPerQuarterHour}},{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}},{key:"Flight",name:"fl1ght.exe",create:null}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(486),i=a(489),o=a(494),s=a(211),l=a(4),c=a(5),u=a(208),m=a(44),h=a(47);const p=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];class d extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1,purchasingAugs:!!e.initiallyOnAugmentationsPage&&e.initiallyOnAugmentationsPage},this.manageGang=this.manageGang.bind(this),this.rerender=this.rerender.bind(this),this.routeToMain=this.routeToMain.bind(this),this.routeToPurchaseAugs=this.routeToPurchaseAugs.bind(this),this.sleevePurchases=this.sleevePurchases.bind(this),this.startFieldWork=this.startFieldWork.bind(this),this.startHackingContracts=this.startHackingContracts.bind(this),this.startHackingMission=this.startHackingMission.bind(this),this.startSecurityWork=this.startSecurityWork.bind(this)}manageGang(){if(this.props.p.inGang())return this.props.engine.loadGangContent();const e=this.props.faction.name;let t=!1;"NiteSec"!==e&&"The Black Hand"!==e||(t=!0);const a=Object(h.d)(),n=Object(h.c)();if(null==a||null==n)return;a.innerHTML="Create Gang",a.addEventListener("click",()=>{this.props.p.startGang(e,t);const a=document.getElementById("world-menu-header");a instanceof HTMLElement&&(a.click(),a.click()),this.props.engine.loadGangContent(),Object(h.a)()}),n.innerHTML="Cancel",n.addEventListener("click",()=>{Object(h.a)()});let r="";r=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.

",Object(h.b)(`Would you like to create a new Gang with ${e}?

Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.

`+r+"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.")}rerender(){this.setState(e=>({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,d="The Covenant"===t.name&&e.bitNodeN>=10&&m.a[10];let g=e.canAccessGang()&&p.includes(t.name);return e.inGang()&&(e.getGangName()!==t.name?g=!1:e.getGangName()===t.name&&(g=!0)),n.createElement("div",null,n.createElement("h1",null,t.name),n.createElement(o.a,{faction:t,factionInfo:a}),g&&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}),d&&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("div",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(487),i=a(15),o=a(3),s=a(105),l=a(27),c=a(19);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)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(69),i=a(15),o=a(3),s=a(27),l=a(10),c=a(64),u=a(19),m=a(488);const h={margin:"4px",padding:"4px"},p={display:"inline-block"};class d extends n.Component{constructor(e){super(e);const t=i.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(){s.a.SuppressBuyAugmentationConfirmation?Object(r.g)(this.aug,this.props.faction):Object(r.h)(this.aug,this.props.faction)}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),s="";this.hasPrereqs()?this.aug.name!==o.a.NeuroFluxGovernor&&(this.aug.owned||this.owned())?a=!0:this.hasReputation()?i=n.createElement(n.Fragment,null,"UNLOCKED (at ",Object(c.a)(t)," faction reputation) -"," ",n.createElement(l.a,{money:e,player:this.props.p})):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",Object(c.a)(t)," faction reputation -"," ",n.createElement(l.a,{money:e,player:this.props.p}),")"),s="red"):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",this.aug.prereqs.map(e=>Object(m.a)(e))," as prerequisite)"),s="red");const d={display:"inline-block"};""!==s&&(d.color=s);let g=this.aug.name;this.aug.name===o.a.NeuroFluxGovernor&&(g+=" - Level "+Object(r.b)());let f=n.createElement(n.Fragment,null);return f="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",null,n.createElement("span",{style:h},n.createElement(u.a,{disabled:a,onClick:this.handleClick,style:p,text:g,tooltip:f}),n.createElement("p",{style:d},i)))}}},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(4),o=a(357),s=a(10),l=a(64),c=a(19),u=a(2),m=a(7),h=a(165);const p={margin:"5px",height:"26px"};function d(e){const[t,a]=Object(n.useState)(null),d=(i.a.DonateMoneyToRepDivisor+"").length-1;function g(){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(!g())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||!g()}),r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):g()?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(495),i=a(496),o=a(64),s=a(243),l=a(165);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(498),o=a(189),s=a(208),l=a(259),c=a(19),u=a(10),m=a(7);function h(){return(h=Object.assign||function(e){for(var t=1;t=s.b&&(g=!0);const f=[];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."),f)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(499);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(19),o=a(10);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(16);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(31),i=a(55),o=a(140);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 c}));var n=a(69),r=a(24),i=a(1),o=a(60),s=a(20);function l(){document.getElementById("faction-invitation-box-container").style.display="none"}function c(e){var t;t="You have received a faction invitation from "+e.name,document.getElementById("faction-invitation-box-text").innerHTML=t,e.alreadyInvited=!0,i.a.factionInvitations.push(e.name),s.b.isOn(s.a.Factions)&&r.Engine.loadFactionsContent(),Object(o.a)("faction-invitation-box-yes").addEventListener("click",(function(){return-1===i.a.factionInvitations.findIndex(t=>t===e.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(n.e)(e),l(),s.b.isOn(s.a.Factions)&&r.Engine.loadFactionsContent(),!1})),Object(o.a)("faction-invitation-box-no").addEventListener("click",(function(){return l(),!1})),document.getElementById("faction-invitation-box-container").style.display="flex"}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(14);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,u),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)):a.keyCode===i.a.ESC&&(a.preventDefault(),e.onClose())}}),r.a.createElement(l.a,{popup:e.popupId,onClose:()=>e.onAttempt(t),text:"Solve"}),r.a.createElement(l.a,{popup:e.popupId,onClose:e.onClose,text:"Close"}))}},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(10);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",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";a.d(t,"a",(function(){return r}));const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function r(e){let t="";for(let a=0;a=i.a.MaxLevel)n=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),u="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.f)(e,i.a.MaxLevel);else{const n=i.a.MaxLevel-e.level;a=Math.min(n,t)}const c=e.calculateLevelUpgradeCost(a,s.a.hacknet_node_level_cost_mult);n=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:c,player:s.a})),u=s.a.money.lt(c)?"std-button-disabled":"std-button"}let m,h;if(e.ram>=i.a.MaxRam)m=r.a.createElement(r.a.Fragment,null,"MAX RAM"),h="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.g)(e,i.a.MaxRam);else{const n=Math.round(Math.log2(i.a.MaxRam/e.ram));a=Math.min(n,t)}const n=e.calculateRamUpgradeCost(a,s.a.hacknet_node_ram_cost_mult);m=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),h=s.a.money.lt(n)?"std-button-disabled":"std-button"}let p,d;if(e.cores>=i.a.MaxCores)p=r.a.createElement(r.a.Fragment,null,"MAX CORES"),d="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.e)(e,i.a.MaxCores);else{const n=i.a.MaxCores-e.cores;a=Math.min(n,t)}const n=e.calculateCoreUpgradeCost(a,s.a.hacknet_node_core_cost_mult);p=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),d=s.a.money.lt(n)?"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"}},e.name)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},r.a.createElement(l.a,{money:e.totalMoneyGenerated,player:s.a})," (",Object(c.a)(e.moneyGainRatePerSecond),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:u,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.f)(e,i.a.MaxLevel)),Object(o.o)(e,n),a(),!1}},n)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.ram,"GB"),r.a.createElement("button",{className:h,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.g)(e,i.a.MaxRam)),Object(o.p)(e,n),a(),!1}},m)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:d,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.e)(e,i.a.MaxCores)),Object(o.l)(e,n),a(),!1}},p))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(28),o=a(37),s=a(1),l=a(10),c=a(156),u=a(296);class m extends r.a.Component{render(){const e=this.props.node,t=this.props.purchaseMultiplier,a=this.props.recalculate;let n,m;if(e.level>=i.b.MaxLevel)n=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),m="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.f)(e,i.b.MaxLevel);else{const n=i.b.MaxLevel-e.level;a=Math.min(n,t)}const c=e.calculateLevelUpgradeCost(a,s.a.hacknet_node_level_cost_mult);n=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:c,player:s.a})),m=s.a.money.lt(c)?"std-button-disabled":"std-button"}let h,p;if(e.maxRam>=i.b.MaxRam)h=r.a.createElement(r.a.Fragment,null,"MAX RAM"),p="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.g)(e,i.b.MaxRam);else{const n=Math.round(Math.log2(i.b.MaxRam/e.maxRam));a=Math.min(n,t)}const n=e.calculateRamUpgradeCost(a,s.a.hacknet_node_ram_cost_mult);h=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),p=s.a.money.lt(n)?"std-button-disabled":"std-button"}let d,g;if(e.cores>=i.b.MaxCores)d=r.a.createElement(r.a.Fragment,null,"MAX CORES"),g="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.e)(e,i.b.MaxCores);else{const n=i.b.MaxCores-e.cores;a=Math.min(n,t)}const n=e.calculateCoreUpgradeCost(a,s.a.hacknet_node_core_cost_mult);d=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),g=s.a.money.lt(n)?"std-button-disabled":"std-button"}let f,y;if(e.cache>=i.b.MaxCache)f=r.a.createElement(r.a.Fragment,null,"MAX CACHE"),y="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.d)(e,i.b.MaxCache);else{const n=i.b.MaxCache-e.cache;a=Math.min(n,t)}const n=e.calculateCacheUpgradeCost(a);f=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),y=s.a.money.lt(n)?"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"}},e.hostname)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(c.a)(e.totalHashesGenerated)," (",Object(u.a)(e.hashRate),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Hash Capacity:"),r.a.createElement("span",{className:"text"},Object(c.a)(e.hashCapacity))),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:m,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.f)(e,i.b.MaxLevel)),Object(o.o)(e,n),a(),!1}},n)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.maxRam,"GB"),r.a.createElement("button",{className:p,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.g)(e,i.b.MaxRam)),Object(o.p)(e,n),a(),!1}},h)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:g,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.e)(e,i.b.MaxCores)),Object(o.l)(e,n),a(),!1}},d)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cache Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.cache),r.a.createElement("button",{className:y,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.d)(e,i.b.MaxCache)),Object(o.k)(e,n),a(),Object(o.r)(),!1}},f))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(37),o=a(205),s=a(160),l=a(1),c=a(2),u=a(360),m=a(7),h=a(95),p=a(156);class d extends r.a.Component{constructor(e){super(e),this.state={selectedServer:"ecorp"},this.changeTargetServer=this.changeTargetServer.bind(this),this.purchase=this.purchase.bind(this,this.props.hashManager,this.props.upg)}changeTargetServer(e){this.setState({selectedServer:e.target.value})}purchase(e,t){if(e.hashes>=e.getUpgradeCost(t.name)){Object(i.n)(t.name,this.state.selectedServer)?this.props.rerender():Object(m.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 this upgrade affects.")}}render(){const e=this.props.hashManager,t=this.props.upg,a=e.getUpgradeCost(t.name),n=e.upgrades[t.name],i=t.effectText(n),o=e.hashes>=a?"std-button":"std-button-disabled";return r.a.createElement("div",{className:"bladeburner-action"},r.a.createElement(h.b,{value:t.name}),r.a.createElement("p",null,"Cost: ",Object(p.a)(a),", Bought: ",n," times"),r.a.createElement("p",null,t.desc),r.a.createElement("button",{className:o,onClick:this.purchase},"Purchase"),n>0&&i&&r.a.createElement("p",null,i),t.hasTargetServer&&r.a.createElement(u.a,{serverType:u.b.Foreign,onChange:this.changeTargetServer,style:{margin:"5px"}}))}}class g extends r.a.Component{constructor(e){super(e),this.state={totalHashes:l.a.hashManager.hashes}}componentDidMount(){this.interval=setInterval(()=>this.tick(),1e3)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState({totalHashes:l.a.hashManager.hashes})}render(){const e=this.props.rerender,t=l.a.hashManager;if(!(t instanceof o.a))throw new Error("Player does not have a HashManager)");const a=Object.keys(s.a).map(a=>{const n=s.a[a];return r.a.createElement(d,{upg:n,hashManager:t,key:n.name,rerender:e})});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: ",c.a.formatHashes(this.state.totalHashes)),a)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(295);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;s
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(299),r=a(122),i=a(147),o=a(48),s=a(12);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";a.d(t,"a",(function(){return u}));var n=a(76),r=a(521),i=a(77),o=a(168),s=a(88),l=a(22);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="",g=null;function f(){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 _(){for(const e of p.programs)m.push(e)}function b(){for(const e of h.scripts){const t=k(e.filename);t&&m.push(t)}}function E(){for(const e of h.textFiles){const t=k(e.fn);t&&m.push(t)}}function v(){const e=Object(r.a)(h,null==g?"/":g);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=document.getElementById("terminal-input-text-box");if(null==i)return void console.warn("Couldn't find terminal input DOM element (id=terminal-input-text-box) when trying to autocomplete");const o=i,s=o.value.lastIndexOf(";");let l="";if(0!==a.length)if(1===a.length)l=""===t?a[0]+" ":e+" "+a[0],o.value=-1===s?l:o.value.slice(0,s+1)+" "+l,o.focus();else{const i=Object(r.e)(a);let l="";for(let e=0;e "+e),Object(n.c)(l)):(o.value=-1===s?i:`${o.value.slice(0,s+1)} ${i}`,o.focus()):i===t?(Object(n.c)("> "+e+" "+t),Object(n.c)(l)):(o.value=-1==s?`${e} ${i}`:`${o.value.slice(0,s+1)} ${e} ${i}`,o.focus())}}},,,,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(56),r=a(6);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(529),i=a(530);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",null,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(162),i=a(4),o=a(19),s=a(166),l=a(10),c=a(7);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(531),i=a(228),o=a(82),s=a(536);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 _}));var n,r=a(0),i=a(532),o=a(533),s=a(535),l=a(273),c=a(116),u=a(66),m=a(46),h=a(44),p=a(2),d=a(102),g=a(10),f=a(7),y=a(47);!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(n||(n={}));class _ extends r.Component{constructor(e){super(e),this.state={orderType:n.Market,position:m.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)}createPlaceOrderPopupBox(e,t,a){const n=Object(y.i)(),r=Object(y.h)();n.innerText=e,n.addEventListener("click",()=>{const e=parseFloat(Object(y.g)());if(isNaN(e))return Object(f.a)("Invalid input for price: "+Object(y.g)()),!1;a(e),Object(y.e)()}),r.innerText="Cancel Order",r.addEventListener("click",()=>{Object(y.e)()}),Object(y.f)(t)}getBuyTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;const a=Object(c.b)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Purchasing ",p.a.formatShares(t)," shares (",this.state.position===m.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===m.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(c.c)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Selling ",p.a.formatShares(t)," shares (",this.state.position===m.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(f.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.buyStockShort(this.props.stock,e):this.props.buyStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:this.createPlaceOrderPopupBox("Place Buy Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.LimitBuy,this.state.position)});break;case n.Stop:this.createPlaceOrderPopupBox("Place Buy Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.StopBuy,this.state.position)})}}handleBuyMaxButtonClick(){const e=this.props.p.money.toNumber(),t=this.props.stock;let a=Object(c.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===m.a.Short?this.props.buyStockShort(t,a):this.props.buyStockLong(t,a),this.props.rerenderAllTickers();break;default:Object(f.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===m.a.Short?this.setState({position:m.a.Short}):this.setState({position:m.a.Long})}handleQuantityChange(e){this.setState({qty:e.target.value})}handleSellButtonClick(){const e=this.getQuantity();if(isNaN(e))Object(f.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.sellStockShort(this.props.stock,e):this.props.sellStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:this.createPlaceOrderPopupBox("Place Sell Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.LimitSell,this.state.position)});break;case n.Stop:this.createPlaceOrderPopupBox("Place Sell Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.StopSell,this.state.position)})}}handleSellAllButtonClick(){const e=this.props.stock;switch(this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.sellStockShort(e,e.playerShortShares):this.props.sellStockLong(e,e.playerShares),this.props.rerenderAllTickers();break;default:Object(f.a)("ERROR: 'Sell All' only works for Market Orders")}}hasOrderAccess(){return 8===this.props.p.bitNodeN||h.a[8]>=3}hasShortAccess(){return 8===this.props.p.bitNodeN||h.a[8]>=2}render(){return r.createElement("li",null,r.createElement(d.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:m.a.Long},"Long"),this.hasShortAccess()&&r.createElement("option",{value:m.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(363),i=a(27),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(534);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(234);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__(89),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(539);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.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(159),r=a(44);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(17),r=a(262),i=a(44),o=a(5);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 ge})),a.d(t,"recordMoneySource",(function(){return fe})),a.d(t,"gainHackingExp",(function(){return ye})),a.d(t,"gainStrengthExp",(function(){return _e})),a.d(t,"gainDefenseExp",(function(){return be})),a.d(t,"gainDexterityExp",(function(){return Ee})),a.d(t,"gainAgilityExp",(function(){return ve})),a.d(t,"gainCharismaExp",(function(){return ke})),a.d(t,"gainIntelligenceExp",(function(){return Ce})),a.d(t,"queryStatFromString",(function(){return Oe})),a.d(t,"resetWorkStatus",(function(){return Se})),a.d(t,"processWorkEarnings",(function(){return we})),a.d(t,"startWork",(function(){return Te})),a.d(t,"cancelationPenalty",(function(){return Me})),a.d(t,"work",(function(){return xe})),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 De})),a.d(t,"startFocusing",(function(){return Ie})),a.d(t,"stopFocusing",(function(){return Ne})),a.d(t,"startFactionWork",(function(){return je})),a.d(t,"startFactionHackWork",(function(){return Le})),a.d(t,"startFactionFieldWork",(function(){return Be})),a.d(t,"startFactionSecurityWork",(function(){return Fe})),a.d(t,"workForFaction",(function(){return We})),a.d(t,"finishFactionWork",(function(){return Ue})),a.d(t,"getWorkMoneyGain",(function(){return Ge})),a.d(t,"getWorkHackExpGain",(function(){return He})),a.d(t,"getWorkStrExpGain",(function(){return Ke})),a.d(t,"getWorkDefExpGain",(function(){return qe})),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 Xe})),a.d(t,"finishCreateProgramWork",(function(){return Qe})),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 gt})),a.d(t,"applyForNetworkEngineerJob",(function(){return ft})),a.d(t,"applyForBusinessJob",(function(){return yt})),a.d(t,"applyForBusinessConsultantJob",(function(){return _t})),a.d(t,"applyForSecurityJob",(function(){return bt})),a.d(t,"applyForAgentJob",(function(){return Et})),a.d(t,"applyForEmployeeJob",(function(){return vt})),a.d(t,"applyForPartTimeEmployeeJob",(function(){return kt})),a.d(t,"applyForWaiterJob",(function(){return Ct})),a.d(t,"applyForPartTimeWaiterJob",(function(){return Ot})),a.d(t,"isQualified",(function(){return St})),a.d(t,"reapplyAllAugmentations",(function(){return wt})),a.d(t,"reapplyAllSourceFiles",(function(){return Tt})),a.d(t,"checkForFactionInvitations",(function(){return Mt})),a.d(t,"setBitNodeNumber",(function(){return xt})),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 Dt})),a.d(t,"canAccessResleeving",(function(){return It})),a.d(t,"giveExploit",(function(){return Nt})),a.d(t,"getIntelligenceBonus",(function(){return jt})),a.d(t,"getCasinoWinnings",(function(){return Lt}));var n=a(15),r=a(96),i=a(192),o=a(3),s=a(5),l=a(65),c=a(134),u=a(42),m=a(324),h=a(264),p=a(53),d=a(16),g=a(4),f=a(36),y=a(244),_=a(49),b=a(24),E=a(103),v=a(17),k=a(69),C=a(48),O=a(37),S=a(75),w=a(236),T=a(18),M=a(6),x=a(189),P=a(145),A=a(219),R=a(136),D=a(22),I=a(32),N=a(27),j=a(45),L=a(544),B=a(545),F=a(196),W=a(44),U=a(263),G=a(218),H=a(63),K=a(2),q=a(209),$=a(7),z=a(60),Y=a(11),V=a(64),J=a(10),X=a(120),Q=a(265),Z=a(0),ee=a.n(Z),te=a(31),ae=a.n(te);const ne=1e3/g.a.MilliPerCycle;function re(){var e=Object(I.h)({adminRights:!0,hostname:"home",ip:Object(D.c)(),isConnectedTo:!0,maxRam:8,organizationName:"Home PC",purchasedByPlayer:!0});this.homeComputer=e.ip,this.currentServer=e.ip,Object(D.a)(e),this.getHomeComputer().programs.push(f.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 H.a(1e3),this.city=T.a.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.resleeves=[];let t=Math.min(3,W.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.updateSkillLevels(),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 Oe(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 we(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 Te(e){this.resetWorkStatus(g.a.WorkTypeCompany,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=g.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=g.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)),b.Engine.loadWorkInProgressContent()}function Me(){const e=j.a[this.companyName];if(e){const t=D.b[e];if(t&&t.backdoorInstalled)return.75}return.5}function xe(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=g.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((g.a.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=g.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(U.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(X.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(Q.a)(this.workRepGainRate*ne),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.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),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.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,b.Engine.loadLocationContent(!1),t){var n="You worked a short shift of "+Object(Y.b)(this.timeWorked)+" and earned $"+K.a.formatMoney(this.workMoneyGained)+", "+K.a.formatReputation(this.workRepGained)+" reputation, "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" strength exp, "+K.a.formatExp(this.workDefExpGained)+" defense exp, "+K.a.formatExp(this.workDexExpGained)+" dexterity exp, "+K.a.formatExp(this.workAgiExpGained)+" agility exp, and "+K.a.formatExp(this.workChaExpGained)+" charisma exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function Ae(e){this.resetWorkStatus(g.a.WorkTypeCompanyPartTime,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=g.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=g.a.MillisecondsPer8Hours;var t=Object(z.a)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",()=>(this.finishWorkPartTime(),!1)),b.Engine.loadWorkInProgressContent()}function Re(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=g.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((g.a.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=g.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(X.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(V.a)(K.a.formatExp(this.workRepGainRate*ne)+" / sec"),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.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 De(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),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.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,b.Engine.loadLocationContent(!1),e){var a="You worked for "+Object(Y.b)(this.timeWorked)+" and earned a total of $"+K.a.formatMoney(this.workMoneyGained)+", "+K.a.formatReputation(this.workRepGained)+" reputation, "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" strength exp, "+K.a.formatExp(this.workDefExpGained)+" defense exp, "+K.a.formatExp(this.workDexExpGained)+" dexterity exp, "+K.a.formatExp(this.workAgiExpGained)+" agility exp, and "+K.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),a}this.resetWorkStatus()}function Ie(){document.getElementById("mainmenu-container").style.visibility="hidden",this.focus=!0,b.Engine.loadWorkInProgressContent()}function Ne(){document.getElementById("mainmenu-container").style.visibility="visible",this.focus=!1,b.Engine.loadTerminalContent()}function je(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=g.a.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=g.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)),b.Engine.loadWorkInProgressContent()}function Le(e){this.resetWorkStatus(g.a.WorkTypeFaction,e.name,g.a.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=(this.hacking_skill+this.intelligence)/g.a.MaxSkillLevel*this.faction_rep_mult*this.getIntelligenceBonus(.5),this.factionWorkType=g.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)}function Be(e){this.resetWorkStatus(g.a.WorkTypeFaction,e.name,g.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=g.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)}function Fe(e){this.resetWorkStatus(g.a.WorkTypeFaction,e.name,g.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=g.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)}function We(e){const t=v.a[this.currentWorkFactionName];switch(this.factionWorkType){case g.a.FactionWorkHacking:this.workRepGainRate=Object(R.c)(this,t);break;case g.a.FactionWorkField:this.workRepGainRate=Object(R.a)(this,t);break;case g.a.FactionWorkSecurity:this.workRepGainRate=Object(R.b)(this,t)}var a=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=g.a.MillisecondsPer20Hours&&(a=!0,e=Math.round((g.a.MillisecondsPer20Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.processWorkEarnings(e),a||this.timeWorked>=g.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(X.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(Q.a)(this.workRepGainRate*ne),") reputation for this faction ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.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 Ue(e,t=!1){var a=v.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),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadFactionContent(),Object(k.a)(a.name),t){var n="You worked for your faction "+a.name+" for a total of "+Object(Y.b)(this.timeWorked)+". You earned "+K.a.formatReputation(this.workRepGained)+" rep, "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" str exp, "+K.a.formatExp(this.workDefExpGained)+" def exp, "+K.a.formatExp(this.workDexExpGained)+" dex exp, "+K.a.formatExp(this.workAgiExpGained)+" agi exp, and "+K.a.formatExp(this.workChaExpGained)+" cha exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function Ge(){let e=1;const t=u.a[this.companyName];W.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 He(){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 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 str exp gain will be 0"].join(" ")),0):a.strengthExpGain*e.expMultiplier*this.strength_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 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/g.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=g.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",b.Engine.loadWorkInProgressContent()}function Xe(e){var t=this.createProgramReqLvl,a=this.hacking_skill/t*this.getIntelligenceBonus(3);a=1+(a-1)/5,this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=b.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 Qe(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/g.a.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadTerminalContent(),this.resetWorkStatus()}function Ze(e,t,a){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=g.a.WorkTypeStudyClass,this.className=a;const n=1e3/b.Engine._idleSpeed;var r=0,i=0,o=0,l=0,c=0,u=0,m=0;const h=this.hashManager;switch(a){case g.a.ClassStudyComputerScience:i=g.a.ClassStudyComputerScienceBaseExp*t/n*h.getStudyMult();break;case g.a.ClassDataStructures:r=g.a.ClassDataStructuresBaseCost*e/n,i=g.a.ClassDataStructuresBaseExp*t/n*h.getStudyMult();break;case g.a.ClassNetworks:r=g.a.ClassNetworksBaseCost*e/n,i=g.a.ClassNetworksBaseExp*t/n*h.getStudyMult();break;case g.a.ClassAlgorithms:r=g.a.ClassAlgorithmsBaseCost*e/n,i=g.a.ClassAlgorithmsBaseExp*t/n*h.getStudyMult();break;case g.a.ClassManagement:r=g.a.ClassManagementBaseCost*e/n,m=g.a.ClassManagementBaseExp*t/n*h.getStudyMult();break;case g.a.ClassLeadership:r=g.a.ClassLeadershipBaseCost*e/n,m=g.a.ClassLeadershipBaseExp*t/n*h.getStudyMult();break;case g.a.ClassGymStrength:r=g.a.ClassGymBaseCost*e/n,o=t/n*h.getTrainingMult();break;case g.a.ClassGymDefense:r=g.a.ClassGymBaseCost*e/n,l=t/n*h.getTrainingMult();break;case g.a.ClassGymDexterity:r=g.a.ClassGymBaseCost*e/n,c=t/n*h.getTrainingMult();break;case g.a.ClassGymAgility:r=g.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==g.a.ClassGymStrength||a==g.a.ClassGymDefense||a==g.a.ClassGymDexterity||a==g.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",b.Engine.loadWorkInProgressContent()}function et(e){this.timeWorked+=b.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(X.a)(this.workMoneyLossRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have gained: ",ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.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(g.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),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var t="After "+this.className+" for "+Object(Y.b)(this.timeWorked)+", you spent a total of "+K.a.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" strength exp, "+K.a.formatExp(this.workDefExpGained)+" defense exp, "+K.a.formatExp(this.workDexExpGained)+" dexterity exp, "+K.a.formatExp(this.workAgiExpGained)+" agility exp, and "+K.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=g.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",b.Engine.loadWorkInProgressContent()}function nt(e){if(this.timeWorked+=b.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 _.a)if(_.a[t].type==this.crimeType){e=_.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 "+K.a.formatMoney(this.workMoneyGained)+", "+K.a.formatExp(this.workHackExpGained)+" hack exp, "+K.a.formatExp(this.workStrExpGained)+" str exp, "+K.a.formatExp(this.workDefExpGained)+" def exp, "+K.a.formatExp(this.workDexExpGained)+" dex exp, "+K.a.formatExp(this.workAgiExpGained)+" agi exp, "+K.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),K.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.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 "+K.a.formatExp(this.workHackExpGained)+" hack exp, "+K.a.formatExp(this.workStrExpGained)+" str exp, "+K.a.formatExp(this.workDefExpGained)+" def exp, "+K.a.formatExp(this.workDexExpGained)+" dex exp, "+K.a.formatExp(this.workAgiExpGained)+" agi exp, "+K.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),K.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.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(),b.Engine.loadLocationContent(!1)}function it(){if(!this.isWorking)return"";var e;switch(this.workType){case g.a.WorkTypeStudyClass:e=this.finishClass(!0);break;case g.a.WorkTypeCompany:e=this.finishWork(!0,!0);break;case g.a.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case g.a.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case g.a.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0);break;case g.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(G.b)(this);return!1===N.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,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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 gt(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 ft(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 _t(e=!1){return this.applyForJob(p.a[d.c[0]],e)}function bt(e=!1){return this.applyForJob(p.a[d.h[2]],e)}function Et(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 vt(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],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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 kt(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],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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 Ot(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],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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 wt(e=!0){e&&this.resetMultipliers();for(let e=0;et}var i=v.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=v.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=v.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=v.a.ECorp;c.isBanned||c.isMember||c.alreadyInvited||!r(M.a.AevumECorp)||e.push(c);var m=v.a.MegaCorp;m.isBanned||m.isMember||m.alreadyInvited||!r(M.a.Sector12MegaCorp)||e.push(m);var h=v.a["Bachman & Associates"];h.isBanned||h.isMember||h.alreadyInvited||!r(M.a.AevumBachmanAndAssociates)||e.push(h);var p=v.a["Blade Industries"];p.isBanned||p.isMember||p.alreadyInvited||!r(M.a.Sector12BladeIndustries)||e.push(p);var d=v.a.NWO;d.isBanned||d.isMember||d.alreadyInvited||!r(M.a.VolhavenNWO)||e.push(d);var f=v.a["Clarke Incorporated"];f.isBanned||f.isMember||f.alreadyInvited||!r(M.a.AevumClarkeIncorporated)||e.push(f);var y=v.a["OmniTek Incorporated"];y.isBanned||y.isMember||y.alreadyInvited||!r(M.a.VolhavenOmniTekIncorporated)||e.push(y);var _=v.a["Four Sigma"];_.isBanned||_.isMember||_.alreadyInvited||!r(M.a.Sector12FourSigma)||e.push(_);var b=v.a["KuaiGong International"];b.isBanned||b.isMember||b.alreadyInvited||!r(M.a.ChongqingKuaiGongInternational)||e.push(b);var E=v.a["Fulcrum Secret Technologies"],k=D.b[j.a[j.b.FulcrumSecretTechnologies]];null==k?console.error("Could not find Fulcrum Secret Technologies Server"):E.isBanned||E.isMember||E.alreadyInvited||!k.backdoorInstalled||!r(M.a.AevumFulcrumTechnologies,25e4)||e.push(E);var C=v.a.BitRunners,S=(this.getHomeComputer(),D.b[j.a[j.b.BitRunnersServer]]);null==S?console.error("Could not find BitRunners Server"):C.isBanned||C.isMember||!S.backdoorInstalled||C.alreadyInvited||e.push(C);var w=v.a["The Black Hand"],x=D.b[j.a[j.b.TheBlackHandServer]];null==x?console.error("Could not find The Black Hand Server"):w.isBanned||w.isMember||!x.backdoorInstalled||w.alreadyInvited||e.push(w);var P=v.a.NiteSec,A=D.b[j.a[j.b.NiteSecServer]];null==A?console.error("Could not find NiteSec Server"):P.isBanned||P.isMember||!A.backdoorInstalled||P.alreadyInvited||e.push(P);var R=v.a.Chongqing;R.isBanned||R.isMember||R.alreadyInvited||!this.money.gte(2e7)||this.city!=T.a.Chongqing||e.push(R);var I=v.a["Sector-12"];I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(15e6)||this.city!=T.a.Sector12||e.push(I);var N=v.a["New Tokyo"];N.isBanned||N.isMember||N.alreadyInvited||!this.money.gte(2e7)||this.city!=T.a.NewTokyo||e.push(N);var L=v.a.Aevum;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(4e7)||this.city!=T.a.Aevum||e.push(L);var B=v.a.Ishima;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(3e7)||this.city!=T.a.Ishima||e.push(B);var F=v.a.Volhaven;F.isBanned||F.isMember||F.alreadyInvited||!this.money.gte(5e7)||this.city!=T.a.Volhaven||e.push(F);var W=v.a["Speakers for the Dead"];!W.isBanned&&!W.isMember&&!W.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(M.a.Sector12CIA)&&!a.includes(M.a.Sector12NSA)&&e.push(W);var U=v.a["The Dark Army"];!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==T.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!a.includes(M.a.Sector12CIA)&&!a.includes(M.a.Sector12NSA)&&e.push(U);var G=v.a["The Syndicate"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==T.a.Aevum||this.city==T.a.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&!a.includes(M.a.Sector12CIA)&&!a.includes(M.a.Sector12NSA)&&e.push(G);var H=v.a.Silhouette;!H.isBanned&&!H.isMember&&!H.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(H);var K=v.a.Tetrads;!K.isBanned&&!K.isMember&&!K.alreadyInvited&&(this.city==T.a.Chongqing||this.city==T.a.NewTokyo||this.city==T.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(K);var q=v.a["Slum Snakes"];!q.isBanned&&!q.isMember&&!q.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(q);var $=v.a.Netburners,z=0,Y=0,V=0;for(let e=0;e=80&&z>=8&&Y>=4&&V>=100&&e.push($);var J=v.a["Tian Di Hui"];J.isBanned||J.isMember||J.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=T.a.Chongqing&&this.city!=T.a.NewTokyo&&this.city!=T.a.Ishima||e.push(J);var X=v.a.CyberSec,Q=D.b[j.a[j.b.CyberSecServer]];return null==Q?console.error("Could not find CyberSec Server"):X.isBanned||X.isMember||!Q.backdoorInstalled||X.alreadyInvited||e.push(X),e}function xt(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||!(v.a[e.name]instanceof E.a))return e.type=l.c.FactionReputationAll,this.gainCodingContractReward(e);var a=g.a.CodingContractBaseFactionRepGain*t;return v.a[e.name].playerReputation+=a,`Gained ${a} faction reputation for ${e.name}`;case l.c.FactionReputationAll:const i=g.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)v.a[e]instanceof E.a&&(v.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=g.a.CodingContractBaseCompanyRepGain*t;return u.a[e.name].playerReputation+=a,`Gained ${a} company reputation for ${e.name}`;case l.c.Money:default:var r=g.a.CodingContractBaseMoneyGain*t*s.a.CodingContractMoney;return this.gainMoney(r),this.recordMoneySource(r,"codingcontract"),"Gained "+K.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 Dt(e){return null==w.a[e]?(console.warn("Player.gotoLocation() called with invalid location: "+e),!1):(this.location=e,!0)}function It(){return 10===this.bitNodeN||W.a[10]>0}function Nt(e){this.exploits.includes(e)||this.exploits.push(e)}function jt(e){return Object(A.a)(this.intelligence,e)}function Lt(){return this.moneySourceA.casino}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(18),r=a(6),i=a(38);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(196),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;ae.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(102);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(164),o=a(102);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(15);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(15),i=a(3),o=a(1),s=a(303);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;ai.a.startFocusing(),id:"character-overview-options-button",className:"character-overview-btn"},"Focus"))));return r.a.createElement(r.a.Fragment,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",{id:"character-hp-wrapper"},r.a.createElement("td",{className:"character-hp-cell"},"HP:"),r.a.createElement("td",{id:"character-hp-text",className:"character-hp-cell character-stat-cell"},o.a.formatHp(i.a.hp)+" / "+o.a.formatHp(i.a.max_hp))),r.a.createElement("tr",{id:"character-money-wrapper"},r.a.createElement("td",{className:"character-money-cell"},"Money: "),r.a.createElement("td",{id:"character-money-text",className:"character-money-cell character-stat-cell"},o.a.formatMoney(i.a.money.toNumber()))),r.a.createElement("tr",{id:"character-hack-wrapper"},r.a.createElement("td",{className:"character-hack-cell"},"Hack: "),r.a.createElement("td",{id:"character-hack-text",className:"character-hack-cell character-stat-cell"},o.a.formatSkill(i.a.hacking_skill))),r.a.createElement("tr",{id:"character-str-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-combat-cell"},"Str: "),r.a.createElement("td",{id:"character-str-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.strength))),r.a.createElement("tr",{id:"character-def-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Def: "),r.a.createElement("td",{id:"character-def-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.defense))),r.a.createElement("tr",{id:"character-dex-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Dex: "),r.a.createElement("td",{id:"character-dex-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.dexterity))),r.a.createElement("tr",{id:"character-agi-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Agi: "),r.a.createElement("td",{id:"character-agi-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.agility))),r.a.createElement("tr",{id:"character-cha-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-cha-cell"},"Cha: "),r.a.createElement("td",{id:"character-cha-text",className:"character-cha-cell character-stat-cell"},o.a.formatSkill(i.a.charisma))),i.a.intelligence>=1&&e,i.a.isWorking&&!i.a.focus&&t)))}}},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(69);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(31),i=a(557),o=a(20);let s;function l(e,t,a){o.b.isOn(o.a.Gang)&&r.render(n.createElement(i.a,{engine:e,gang:t,player:a}),s)}document.addEventListener("DOMContentLoaded",(function e(){const t=document.getElementById("gang-container");if(null===t)throw new Error("Could not find element 'gang-container'");s=t,document.removeEventListener("DOMContentLoaded",e)}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(558),o=a(571),s=a(69);function l(e){const[t,a]=Object(n.useState)(!0),l=Object(n.useState)(!1)[1];return Object(n.useEffect)(()=>{const e=setInterval(()=>l(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,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(559),o=a(561);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(17),o=a(11),s=a(2),l=a(120),c=a(64),u=a(48),m=a(560);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(4),i=a(11);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(562),o=a(563),s=a(21),l=a(569);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 h}));var n=a(0),r=a.n(n),i=a(11),o=a(2),s=a(147),l=a(10),c=a(21),u=a(126);function m(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),m=a(e.member.upgrades,u.a.Vehicle),h=a(e.member.upgrades,u.a.Rootkit),p=a(e.member.augmentations,u.a.Augmentation);function d(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 f=e.member.calculateAscensionMult(e.member.hack_asc_points),y=e.member.calculateAscensionMult(e.member.str_asc_points),_=e.member.calculateAscensionMult(e.member.def_asc_points),b=e.member.calculateAscensionMult(e.member.dex_asc_points),E=e.member.calculateAscensionMult(e.member.agi_asc_points),v=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*f,2),")",r.a.createElement("br",null),"Str: ",e.member.str," (x",Object(i.c)(e.member.str_mult*y,2),")",r.a.createElement("br",null),"Def: ",e.member.def," (x",Object(i.c)(e.member.def_mult*_,2),")",r.a.createElement("br",null),"Dex: ",e.member.dex," (x",Object(i.c)(e.member.dex_mult*b,2),")",r.a.createElement("br",null),"Agi: ",e.member.agi," (x",Object(i.c)(e.member.agi_mult*E,2),")",r.a.createElement("br",null),"Cha: ",e.member.cha," (x",Object(i.c)(e.member.cha_mult*v,2),")"),r.a.createElement("div",{className:"gang-owned-upgrades-div noselect"},"Purchased Upgrades:"," ",e.member.upgrades.map(e=>d(e)),e.member.augmentations.map(e=>d(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("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Armor"),c.map(e=>g(e))),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Vehicles"),m.map(e=>g(e))),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Rootkits"),h.map(e=>g(e,!0))),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Augmentations"),p.map(e=>g(e,!0))))}function h(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(m,{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(102),o=a(564);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(565),o=a(567),s=a(568);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(7),o=a(11),s=a(2),l=a(21),c=a(566);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(21),s=a(7);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(132),s=a(120);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(122);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(570),o=a(170),s=a(11),l=a(21);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(21),o=a(7);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!")}function l(){Object(i.b)(e.popupId)}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(),27===e.keyCode&&l()},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"),r.a.createElement("a",{className:"std-button",onClick:l},"Cancel"))}},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(7),s=a(11),l=a(48);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 l}));var n=a(0),r=a.n(n),i=a(573),o=a(575),s=a(576);function l(e){return r.a.createElement("div",{id:"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 g}));var n=a(0),r=a.n(n),i=a(11),o=a(39),s=a(10),l=a(132),c=a(2),u=a(7),m=a(21),h=a(17),p=a(69),d=a(574);function g(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(21),o=a(39);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."),o.a.CityNames.map(t=>r.a.createElement("div",{key:t,className:"cmpy-mgmt-find-employee-option",onClick:()=>function(t){e.bladeburner.city=t,Object(i.b)(e.popupId)}(t)},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(577),o=a(580),s=a(583),l=a(586),c=a(589),u=a(158);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":"bladeburner-nav-button-inactive"},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(578);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(579),o=a(150);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(26),o=a(130),s=a(11),l=a(95);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(581);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(582);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(26),o=a(130),s=a(11),l=a(158),c=a(39),u=a(237),m=a(95);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,g=e.action.getActionTime(e.bladeburner),f=`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*g),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:f},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:f,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(584);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(585);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(26),o=a(130),s=a(11),l=a(158),c=a(39),u=a(21),m=a(304),h=a(237),p=a(95);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),g=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),f=e.action.level>=e.action.maxLevel,y=e.action.getActionTime(e.bladeburner),_=`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)(g,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:g/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 "+(f?"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:_},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:_,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(587);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(149),o=a(588);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(11),o=a(26),s=a(130),l=a(158),c=a(21),u=a(304),m=a(237),h=a(95);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),g=e.bladeburner.rank>=e.action.reqdRank,f=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)(f,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:f/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:g?"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:g?"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(590),o=a(39),s=a(11);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(591),i=a(137);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(95),o=a(11);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.skillPoints3?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(594),o=a(624);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(19),o=a(62);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 _}));var n,r=a(0),i=a.n(r),o=a(62),s=a(625),l=a(626),c=a(627),u=a(628),m=a(629),h=a(630),p=a(631),d=a(632),g=a(633),f=a(634);!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,g.a];function _(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 g(){p({lastGames:[h.lastGames[1],h.id],id:d()})}function _(e){m(t=>{let a=t;return a+=e?"✓":"✗",a.length>15&&(a=a.slice(1)),a})}let b;switch(l){case n.Countdown:b=i.a.createElement(s.a,{onFinish:()=>c(n.Minigame)});break;case n.Minigame:{const r=y[h.id];b=i.a.createElement(r,{onSuccess:function(){_(!0),t===e.MaxLevel?c(n.Sell):(c(n.Countdown),a(t+1)),g()},onFailure:function(t){c(n.Countdown),_(!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()}g()},difficulty:e.Difficulty+t/50});break}case n.Sell:b=i.a.createElement(f.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},b)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(62);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(62),o=a(109),s=a(110),l=a(141),c=a(111),u=a(308);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(62),o=a(109),s=a(110),l=a(111);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(62),o=a(109),s=a(110),l=a(141),c=a(111),u=a(308);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,g]=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():g(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(62),o=a(109),s=a(110),l=a(111);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(62),o=a(109),s=a(110),l=a(141),c=a(111);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(62),o=a(109),s=a(110),l=a(111),c=a(141);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==f[0]&&t==f[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=[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,y(n),32==t.keyCode){if(m[f[1]][f[0]]!==p[d])return void e.onFailure();g(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(62),o=a(109),s=a(110),l=a(111),c=a(141);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(()=>_(!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==g[0]&&t==g[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=[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,f(n),32==t.keyCode){if(!m[g[1]][g[0]])return void e.onFailure();d(t=>(t[g[1]][g[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,_.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 g(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,a)=>t===a}}function f(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(17),r=a(0),i=a.n(r),o=a(19),s=a(62),l=a(10),c=a(64),u=a(5);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 o}));var n=a(0),r=a(27),i=a(19);class o extends n.Component{asciiCity(){const e=e=>e?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 b}));var n=a(0),r=a(637),i=a(638),o=a(639),s=a(640),l=a(641),c=a(642),u=a(646),m=a(647),h=a(648),p=a(38),d=a(27),g=a(45),f=a(32),y=a(19),_=a(668);class b 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=g.a.getIp(this.props.loc.name),a=Object(f.b)(t),r=null!==a&&Object(f.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(_.a,{content:this.props.loc.name}):this.props.loc.name),e)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(163),i=a(236),o=a(42),s=a(194),l=a(53),c=a(16),u=a(19),m=a(64),h=a(243),p=a(47);function d(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 f extends n.Component{constructor(e){if(super(e),d(this,"companyPosition",null),d(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;const t=Object(p.d)(),a=Object(p.c)();null!=t&&null!=a&&(t.innerHTML="Quit job",a.innerHTML="Cancel",t.addEventListener("click",()=>{this.props.p.quitJob(this.props.locName),this.checkIfEmployedHere(!0),Object(p.a)()}),a.addEventListener("click",()=>{Object(p.a)()}),Object(p.b)(n.createElement(n.Fragment,null,"Would you like to quit your job at ",this.company.name,"?")))}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"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(4),i=a(32),o=a(45),s=a(19),l=a(10);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(218),i=a(108),o=a(10),s=a(7);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(49),i=a(2),o=a(108);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),g=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(g)} chance of success)`,tooltip:"Attempt to pull off the ultimate heist"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(188),i=a(6),o=a(108),s=a(19),l=a(7);class c 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(){Object(r.b)(this.props.p)}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(l.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(l.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(s.a,{onClick:this.handleBladeburner,style:this.btnStyle,text:e})}renderNoodleBar(){return n.createElement(s.a,{onClick:function(){Object(l.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(o.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(s.a,{onClick:this.handleResleeving,style:this.btnStyle,text:"Re-Sleeve"}):null}render(){switch(this.props.loc.name){case i.a.NewTokyoVitaLife:return this.renderResleeving();case i.a.Sector12CityHall:return this.renderCreateCorporation();case i.a.Sector12NSA:return this.renderBladeburner();case i.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 m}));var n=a(0),r=a(188),i=a(643),o=a(644),s=a(645),l=a(114),c=a(19),u=a(10);function m(e){const t={display:"block"},a=[];for(let i=e.loc.techVendorMinRam;i<=e.loc.techVendorMaxRam;i*=2){const o=Object(l.a)(i);a.push(n.createElement(c.a,{key:i,onClick:()=>Object(r.a)(i,e.p),style:t,text:n.createElement(n.Fragment,null,"Purchase ",i,"GB Server - ",n.createElement(u.a,{money:o,player:e.p})),disabled:!e.p.canAfford(o)}))}return n.createElement("div",null,a,n.createElement("br",null),n.createElement("p",{className:"noselect"},n.createElement("i",null,'"You can order bigger servers via scripts. We don\'t take custom order in person."')),n.createElement("br",null),n.createElement(o.a,{p:e.p}),n.createElement(i.a,{p:e.p}),n.createElement(s.a,{p:e.p}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(4),o=a(114),s=a(166),l=a(19),c=a(10),u=a(165);function m(e){const t=Object(n.useState)(!1)[1];const a={display:"block"},m=e.p.getHomeComputer();if(m.maxRam>=i.a.HomeComputerMaxRam)return r.a.createElement(s.a,{style:a,text:"Upgrade 'home' RAM - MAX"});const h=e.p.getUpgradeHomeRamCost();return r.a.createElement(l.a,{disabled:!e.p.canAfford(h),onClick:function(){Object(o.d)(e.p),t(e=>!e)},style:a,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' RAM (",m.maxRam,"GB ->"," ",2*m.maxRam,"GB) - ",r.a.createElement(c.a,{money:h,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(188),o=a(4),s=a(166),l=a(19),c=a(10);function u(e){const t=Object(n.useState)(!1)[1];const a={display:"block"};return e.p.hasTorRouter()?r.a.createElement(s.a,{style:a,text:"TOR Router - Purchased"}):r.a.createElement(l.a,{disabled:!e.p.canAfford(o.a.TorRouterCost),onClick:function(){Object(i.d)(e.p),t(e=>!e)},style:a,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 c}));var n=a(0),r=a.n(n),i=a(166),o=a(19),s=a(10),l=a(165);function c(e){const t=Object(n.useState)(!1)[1];const a={display:"block"},c=e.p.getHomeComputer(),u=c.cpuCores>=8;if(u)return r.a.createElement(i.a,{style:a,text:"Upgrade 'home' cores - MAX"});const m=1e9*Math.pow(7.5,c.cpuCores);return r.a.createElement(o.a,{disabled:!e.p.canAfford(m),onClick:function(){u||e.p.canAfford(m)&&(e.p.loseMoney(m),c.cpuCores++,t(e=>!e))},style:a,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' cores (",c.cpuCores," ->"," ",c.cpuCores+1,") - ",r.a.createElement(s.a,{money:m,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(18),i=a(188),o=a(4),s=a(27),l=a(19),c=a(10);class u extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"}}asciiWorldMap(){const e=e=>e.city!==this.props.p.city?n.createElement("span",{className:"tooltip",style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px"},onClick:i.c.bind(null,e.city,this.props.travel)},n.createElement("span",{className:"tooltiptext"},e.city),n.createElement("b",null,e.city[0])):n.createElement("span",null,e.city[0]);return n.createElement("div",{className:"noselect"},n.createElement("p",null,"From here, you can travel to any other city! A ticket costs"," ",n.createElement(c.a,{money:o.a.TravelCost,player:this.props.p}),"."),n.createElement("pre",null," ,_ . ._. _. ."),n.createElement("pre",null," , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-"),n.createElement("pre",null," /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_"),n.createElement("pre",null," / ,/'-/~ '\\ ,' _ , '",n.createElement(e,{city:"Volhaven"}),",'|~ ._/-, /~"),n.createElement("pre",null," ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~"),n.createElement("pre",null,".-~ '| '',\\~|\\ _\\~ ,_ , ",n.createElement(e,{city:"Chongqing"})," /,"),n.createElement("pre",null," '\\ ",n.createElement(e,{city:"Sector-12"})," /'~ |_/~\\\\,-,~ \\ \" ,_,/ |"),n.createElement("pre",null," | / ._-~'\\_ _~| \\ ) ",n.createElement(e,{city:"New Tokyo"})),n.createElement("pre",null," \\ __-\\ '/ ~ |\\ \\_ / ~"),n.createElement("pre",null," ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,"),n.createElement("pre",null," ~-_' _; '\\ '-, \\,' /\\/ |"),n.createElement("pre",null," '\\_,~'\\_ \\_ _, /' ' |, /|'"),n.createElement("pre",null," / \\_ ~ | / \\ ~'; -,_."),n.createElement("pre",null," | ~\\ | | , '-_, ,; ~ ~\\"),n.createElement("pre",null," \\, ",n.createElement(e,{city:"Aevum"})," / \\ / /| ,-, , -,"),n.createElement("pre",null," | ,/ | |' |/ ,- ~ \\ '."),n.createElement("pre",null," ,| ,/ \\ ,/ \\ ",n.createElement(e,{city:"Ishima"})," |"),n.createElement("pre",null," / | ~ -~~-, / _"),n.createElement("pre",null," | ,-' ~ /"),n.createElement("pre",null," / ,' ~"),n.createElement("pre",null," ',| ~"),n.createElement("pre",null," ~'"))}listWorldMap(){const e=[];for(const t in r.a){const a=r.a[t];a!==this.props.p.city&&e.push(n.createElement(l.a,{key:a,onClick:i.c.bind(null,a,this.props.travel),style:this.btnStyle,text:"Travel to "+a}))}return n.createElement("div",null,n.createElement("p",null,"From here, you can travel to any other city! A ticket costs"," ",n.createElement(c.a,{money:o.a.TravelCost}),"."),e)}render(){return s.a.DisableASCIIArt?this.listWorldMap():this.asciiWorldMap()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(4),i=a(32),o=a(45),s=a(19),l=a(10);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(649),o=a(665),s=a(666),l=a(667),c=a(19);!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 g}));var n=a(0),r=a(10),i=a(201),o=a(650),s=a(276),l=a(991),c=a(367),u=a(652),m=a(335),h=a(370);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 g 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: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:g}=this.state,f=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:g}))),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): "),f.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(138),r=a(651);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(o.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(19),i=a(197),o=a(201),s=a(50);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(19),i=a(10),o=a(201),s=a(197),l=a(50);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(19),i=a(10),o=a(197),s=a(201),l=a(50);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(19),o=a(670),s=a(21),l=a(683),c=a(684),u=a(76),m=a(7),h=a(221),p=a(83),d=a(204),g=a(167),f=a(292),y=a(169),_=a(2),b=a(372),E=a(373),v=a(261),k=a(27),C=a(58);let O=[];!function(){const e=Object(v.a)({});O=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"];O=O.filter(e=>!t.includes(e))}();let S="",w="",T=null;function M(e){const t=Object(n.useRef)(null),[a,v]=Object(n.useState)(e.filename?e.filename:S),[M,x]=Object(n.useState)(e.code?e.code:w),[P,A]=Object(n.useState)("RAM: ???"),[R,D]=Object(n.useState)({theme:k.a.MonacoTheme,insertSpaces:k.a.MonacoInsertSpaces});function I(){if(null!==t.current){const e=t.current.getPosition();null!==e&&b.a.saveCursor(a,{row:e.lineNumber,column:e.column})}if(T=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==M.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: "+_.a.formatRAM(a))}return Object(n.useEffect)(()=>{""!==e.filename&&(S=e.filename,w=e.code,T=null)},[]),Object(n.useEffect)(()=>{const e=setInterval(N,1e3);return()=>clearInterval(e)},[M]),Object(n.useEffect)(()=>{function e(e){k.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",{id:"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,v(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=>{D(e),k.a.MonacoTheme=e.theme,k.a.MonacoInsertSpaces=e.insertSpaces}})}})),r.a.createElement(o.a,{beforeMount:function(e){e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const a of O)t.push({label:a,kind:e.languages.CompletionItemKind.Function,insertText:a,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(E.a,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(E.a,"netscript.d.ts")},onMount:function(e){if(t.current=e,null===t.current)return;const n=b.a.getCursor(a);-1!==n.row?t.current.setPosition({lineNumber:n.row,column:n.column}):null!==T&&t.current.setPosition({lineNumber:T.lineNumber,column:T.column+1}),t.current.focus()},loading:r.a.createElement("p",null,"Loading script editor!"),height:"80%",defaultLanguage:"javascript",defaultValue:M,onChange:function(e){void 0!==e&&(w=e,null!==t.current&&(T=t.current.getPosition()),x(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)(M,{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(19),o=a(21);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 c}));var n=a(20),r=a(686),i=a(1),o=a(0),s=a(31);let l=null;function c(){n.b.isOn(n.a.Milestones)&&l instanceof HTMLElement&&s.render(o.createElement(r.a,{player:i.a}),l)}document.addEventListener("DOMContentLoaded",(function e(){l=document.getElementById("milestones-container"),document.removeEventListener("DOMContentLoaded",e)}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(374),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(r.Fragment,null,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 d}));var n=a(0),r=a.n(n),i=a(301),o=a(15),s=a(10),l=a(7),c=a(30),u=a(154),m=a(240),h=a(79),p=a(143);function d(e,t){const a=e.augmentations.map(e=>e.name),n=Object(i.a)(e,t),g="purchase-sleeve-augs-popup",f=[Object(m.a)(g,{innerText:"Cancel"}),Object(c.a)("p",{display:"block",innerHTML:"Owned Augmentations:"})],y=Object(c.a)("div",{width:"70%"});for(const e of a){const t=o.a[e];if(null==t){console.warn("Invalid Augmentation: "+e);continue}let a=t.info;"string"!=typeof a&&(a=Object(p.renderToStaticMarkup)(a)),a+="

",a+=Object(p.renderToStaticMarkup)(t.stats),y.appendChild(Object(c.a)("div",{class:"gang-owned-upgrade",innerText:e,tooltip:a}))}f.push(y);const _=Object(c.a)("p",{innerHTML:["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.

","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."].join(" ")});f.push(_);for(const a of n){const n=Object(c.a)("div",{class:"cmpy-mgmt-upgrade-div"});let i=a.info;"string"!=typeof i&&(i=Object(p.renderToStaticMarkup)(i)),i+="

",i+=Object(p.renderToStaticMarkup)(a.stats),n.appendChild(Object(c.a)("p",{fontSize:"12px",innerHTML:[`

${a.name}


`,`Cost: ${Object(p.renderToStaticMarkup)(r.a.createElement(s.a,{money:a.startingCost,player:t}))}

`,""+i].join(" "),padding:"2px",clickListener:()=>{e.tryBuyAugmentation(t,a)?(Object(l.a)(`Installed ${a.name} on Duplicate Sleeve!`,!1),Object(h.a)(g),d(e,t)):Object(l.a)("You cannot afford "+a.name,!1)}})),f.push(n)}Object(u.a)(g,f)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);const r=n.createElement(n.Fragment,null,n.createElement("strong",null,n.createElement("u",null,"How do Duplicate Sleeves work?")),n.createElement("br",null),"Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience, and reputation.",n.createElement("br",null),n.createElement("br",null),"Sleeves are their own individuals, which means they each have their own experience and stats.",n.createElement("br",null),n.createElement("br",null),"When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well as all of the player's other sleeves.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"What is Synchronization (Sync)?")),n.createElement("br",null),"Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing a task.",n.createElement("br",null),n.createElement("br",null),"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve and the player's original host consciousness earn N% of the amount of experience normally earned by the task. All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.",n.createElement("br",null),n.createElement("br",null),"Synchronization can be increased by assigning sleeves to the 'Synchronize' task.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"What is Shock?")),n.createElement("br",null),"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the amount of experience earned by the sleeve.",n.createElement("br",null),n.createElement("br",null),"Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning sleeves to the 'Shock Recovery' task.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"Why can't I work for this company or faction?")),n.createElement("br",null),"Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two sleeves they can work for two different companies, but they cannot both work for the same company.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"Why did my Sleeve stop working?")),n.createElement("br",null),"Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a company after 8 hours, and stop working for a faction after 20 hours.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"How do I buy Augmentations for my Sleeves?")),n.createElement("br",null),"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"Why can't I buy the X Augmentation for my sleeve?")),n.createElement("br",null),"Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor, are not available for sleeves.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"Do sleeves get reset when installing Augmentations or switching BitNodes?")),n.createElement("br",null),"Sleeves are reset when switching BitNodes, but not when installing Augmentations.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"What is Memory?")),n.createElement("br",null),"Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be set to 25, rather than 1.",n.createElement("br",null),n.createElement("br",null),"Memory can only be increased by purchasing upgrades from The Covenant. It is a persistent stat, meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.")},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.hp)," /"," ",n.a.formatHp(e.max_hp))),r.createElement("tr",null,r.createElement("td",null,"City: "),r.createElement("td",{style:t},e.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.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.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.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.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.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.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.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.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.memory))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(2),r=a(132),i=a(0);function o(e){return i.createElement(i.Fragment,null,Object(r.a)([["Hacking: ",e.hacking_skill,`(${n.a.formatExp(e.hacking_exp)} exp)`],["Strength: ",e.strength,`(${n.a.formatExp(e.strength_exp)} exp)`],["Defense: ",e.defense,`(${n.a.formatExp(e.defense_exp)} exp)`],["Dexterity: ",e.dexterity,`(${n.a.formatExp(e.dexterity_exp)} exp)`],["Agility: ",e.agility,`(${n.a.formatExp(e.agility_exp)} exp)`],["Charisma: ",e.charisma,`(${n.a.formatExp(e.charisma_exp)} exp)`]],"Stats:"),i.createElement("br",null),Object(r.a)([["Hacking Level multiplier: ",n.a.formatPercentage(e.hacking_mult)],["Hacking Experience multiplier: ",n.a.formatPercentage(e.hacking_exp_mult)],["Strength Level multiplier: ",n.a.formatPercentage(e.strength_mult)],["Strength Experience multiplier: ",n.a.formatPercentage(e.strength_exp_mult)],["Defense Level multiplier: ",n.a.formatPercentage(e.defense_mult)],["Defense Experience multiplier: ",n.a.formatPercentage(e.defense_exp_mult)],["Dexterity Level multiplier: ",n.a.formatPercentage(e.dexterity_mult)],["Dexterity Experience multiplier: ",n.a.formatPercentage(e.dexterity_exp_mult)],["Agility Level multiplier: ",n.a.formatPercentage(e.agility_mult)],["Agility Experience multiplier: ",n.a.formatPercentage(e.agility_exp_mult)],["Charisma Level multiplier: ",n.a.formatPercentage(e.charisma_mult)],["Charisma Experience multiplier: ",n.a.formatPercentage(e.charisma_exp_mult)],["Faction Reputation Gain multiplier: ",n.a.formatPercentage(e.faction_rep_mult)],["Company Reputation Gain multiplier: ",n.a.formatPercentage(e.company_rep_mult)],["Salary multiplier: ",n.a.formatPercentage(e.work_money_mult)],["Crime Money multiplier: ",n.a.formatPercentage(e.crime_money_mult)],["Crime Success multiplier: ",n.a.formatPercentage(e.crime_success_mult)]],"Multipliers:"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(2),r=a(10),i=a(0),o=a(132);function s(e){return i.createElement(i.Fragment,null,Object(o.a)([["Money ",i.createElement(r.a,{money:e.earningsForTask.money})],["Hacking Exp ",n.a.formatExp(e.earningsForTask.hack)],["Strength Exp ",n.a.formatExp(e.earningsForTask.str)],["Defense Exp ",n.a.formatExp(e.earningsForTask.def)],["Dexterity Exp ",n.a.formatExp(e.earningsForTask.dex)],["Agility Exp ",n.a.formatExp(e.earningsForTask.agi)],["Charisma Exp ",n.a.formatExp(e.earningsForTask.cha)]],"Earnings for Current Task:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.earningsForPlayer.money})],["Hacking Exp: ",n.a.formatExp(e.earningsForPlayer.hack)],["Strength Exp: ",n.a.formatExp(e.earningsForPlayer.str)],["Defense Exp: ",n.a.formatExp(e.earningsForPlayer.def)],["Dexterity Exp: ",n.a.formatExp(e.earningsForPlayer.dex)],["Agility Exp: ",n.a.formatExp(e.earningsForPlayer.agi)],["Charisma Exp: ",n.a.formatExp(e.earningsForPlayer.cha)]],"Total Earnings for Host Consciousness:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.earningsForSleeves.money})],["Hacking Exp: ",n.a.formatExp(e.earningsForSleeves.hack)],["Strength Exp: ",n.a.formatExp(e.earningsForSleeves.str)],["Defense Exp: ",n.a.formatExp(e.earningsForSleeves.def)],["Dexterity Exp: ",n.a.formatExp(e.earningsForSleeves.dex)],["Agility Exp: ",n.a.formatExp(e.earningsForSleeves.agi)],["Charisma Exp: ",n.a.formatExp(e.earningsForSleeves.cha)]],"Total Earnings for Other Sleeves:"),i.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(117),r=a(15),i=a(12);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;en.createElement("tr",{key:e[0]},n.createElement("td",{key:"0"},e[0]+" multiplier:"),n.createElement("td",{key:"1",style:{textAlign:"right",paddingLeft:"5px"}},r.a.formatPercentage(e[1])),function(e){return c.a[5]>0&&e.length>2&&e[1]!=e[2]?n.createElement("td",{key:"2",style:{textAlign:"right"}}," ","(",r.a.formatPercentage(e[2]),")"):n.createElement(n.Fragment,null)}(e))))))}const d=[["Time played since last Augmentation:",Object(s.b)(e.playtimeSinceLastAug)]];return e.sourceFiles.length>0&&d.push(["Time played since last Bitnode destroyed:",Object(s.b)(e.playtimeSinceLastBitnode)]),d.push(["Total Time played:",Object(s.b)(e.totalPlaytime)]),n.createElement("pre",null,n.createElement("b",null,"General"),n.createElement("br",null),n.createElement("br",null),n.createElement("span",null,"Current City: ",e.city),n.createElement("br",null),n.createElement((function(){return e.companyName?n.createElement(n.Fragment,null,n.createElement("span",null,"Employer at which you last worked: ",e.companyName),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null),n.createElement((function(){return""!==e.companyName?n.createElement(n.Fragment,null,n.createElement("span",null,"Job you last worked: ",e.jobs[e.companyName]),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null),n.createElement((function(){return e.jobs&&0!==Object.keys(e.jobs).length?n.createElement(n.Fragment,null,n.createElement("span",null,"All Employers:"),n.createElement("br",null),n.createElement("ul",null,Object.keys(e.jobs).map(e=>n.createElement("li",{key:e}," * ",e))),n.createElement("br",null),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null),n.createElement("span",null,"Money: ",n.createElement(p.a,{money:e.money.toNumber()})),n.createElement("button",{className:"popup-box-button",style:{display:"inline-block",float:"none"},onClick:function(){let a=n.createElement(n.Fragment,null,n.createElement("u",null,"Money earned since you last installed Augmentations:"),n.createElement("br",null),t(e.moneySourceA));0!==e.sourceFiles.length&&(a=n.createElement(n.Fragment,null,a,n.createElement("br",null),n.createElement("br",null),n.createElement("u",null,"Money earned in this BitNode:"),n.createElement("br",null),t(e.moneySourceB))),Object(o.a)(a,!1)}},"Money Statistics & Breakdown"),n.createElement("br",null),n.createElement("br",null),n.createElement("b",null,"Stats"),n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",{key:"0"},n.createElement("td",{key:"0"},"Hacking:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.hacking_skill)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.hacking_exp)," exp)")),n.createElement("tr",{key:"1"},n.createElement("td",{key:"0"},"Strength:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.strength)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.strength_exp)," exp)")),n.createElement("tr",{key:"2"},n.createElement("td",{key:"0"},"Defense:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.defense)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.defense_exp)," exp)")),n.createElement("tr",{key:"3"},n.createElement("td",{key:"0"},"Dexterity:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.dexterity)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.dexterity_exp)," exp)")),n.createElement("tr",{key:"4"},n.createElement("td",{key:"0"},"Agility:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.agility)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.agility_exp)," exp)")),n.createElement("tr",{key:"5"},n.createElement("td",{key:"0"},"Charisma:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.charisma)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.charisma_exp)," exp)")),n.createElement((function(){return e.intelligence>0&&(5===e.bitNodeN||c.a[5]>0)?n.createElement("tr",{key:"5"},n.createElement("td",null,"Intelligence:"),n.createElement("td",{style:{textAlign:"right"}},r.a.formatSkill(e.intelligence))):n.createElement(n.Fragment,null)}),null))),n.createElement("br",null),n.createElement(a,{rows:[["Hacking Chance",e.hacking_chance_mult],["Hacking Speed",e.hacking_speed_mult],["Hacking Money",e.hacking_money_mult,e.hacking_money_mult*l.a.ScriptHackMoney],["Hacking Growth",e.hacking_grow_mult,e.hacking_grow_mult*l.a.ServerGrowthRate]]}),n.createElement("br",null),n.createElement(a,{rows:[["Hacking Level",e.hacking_mult,e.hacking_mult*l.a.HackingLevelMultiplier],["Hacking Experience",e.hacking_exp_mult,e.hacking_exp_mult*l.a.HackExpGain]]}),n.createElement("br",null),n.createElement(a,{rows:[["Strength Level",e.strength_mult,e.strength_mult*l.a.StrengthLevelMultiplier],["Strength Experience",e.strength_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Defense Level",e.defense_mult,e.defense_mult*l.a.DefenseLevelMultiplier],["Defense Experience",e.defense_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Dexterity Level",e.dexterity_mult,e.dexterity_mult*l.a.DexterityLevelMultiplier],["Dexterity Experience",e.dexterity_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Agility Level",e.agility_mult,e.agility_mult*l.a.AgilityLevelMultiplier],["Agility Experience",e.agility_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Charisma Level",e.charisma_mult,e.charisma_mult*l.a.CharismaLevelMultiplier],["Charisma Experience",e.charisma_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Hacknet Node production",e.hacknet_node_money_mult,e.hacknet_node_money_mult*l.a.HacknetNodeMoney],["Hacknet Node purchase cost",e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.hacknet_node_level_cost_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Company reputation gain",e.company_rep_mult],["Faction reputation gain",e.faction_rep_mult,e.faction_rep_mult*l.a.FactionWorkRepGain],["Salary",e.work_money_mult,e.work_money_mult*l.a.CompanyWorkMoney]]}),n.createElement("br",null),n.createElement(a,{rows:[["Crime success",e.crime_success_mult],["Crime money",e.crime_money_mult,e.crime_money_mult*l.a.CrimeMoney]]}),n.createElement("br",null),n.createElement((function(){return e.canAccessBladeburner()?n.createElement(n.Fragment,null,n.createElement(a,{rows:[["Bladeburner Success Chance",e.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.bladeburner_success_chance_mult]]}),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null),n.createElement("br",null),n.createElement("b",null,"Misc."),n.createElement("br",null),n.createElement("br",null),n.createElement("span",null,`Servers owned: ${e.purchasedServers.length} / ${Object(u.b)()}`),n.createElement("br",null),n.createElement((function(){return 9===e.bitNodeN||c.a[9]>0?n.createElement(n.Fragment,null,n.createElement("span",null,`Hacknet Servers owned: ${e.hacknetNodes.length} / ${m.b.MaxServers}`),n.createElement("br",null)):n.createElement(n.Fragment,null,n.createElement("span",null,"Hacknet Nodes owned: "+e.hacknetNodes.length),n.createElement("br",null))}),null),n.createElement("span",null,"Augmentations installed: "+e.augmentations.length),n.createElement("br",null),n.createElement("br",null),Object(h.a)(d),n.createElement("br",null),n.createElement((function(){if(e.sourceFiles.length>0){const t="BitNode"+e.bitNodeN;return n.createElement(n.Fragment,null,n.createElement("span",null,"Current BitNode: ",e.bitNodeN," (",i.a[t].name,")"),n.createElement("br",null),n.createElement("br",null),n.createElement("div",{style:{width:"60%",fontSize:"13px",marginLeft:"4%"}},i.a[t].info.split("
").map((e,t)=>n.createElement("div",{key:t},n.createElement("span",{style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},e),n.createElement("br",null)))))}return n.createElement(n.Fragment,null)}),null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(24),r=a(27),i=a(2);function o(){function e(e){0===r.a.AutosaveInterval?e.innerHTML="disabled":e.innerHTML=`every ${r.a.AutosaveInterval}s`}const t=document.getElementById("settingsNSExecTimeRangeValLabel"),a=document.getElementById("settingsNSLogRangeValLabel"),o=document.getElementById("settingsNSPortRangeValLabel"),s=document.getElementById("settingsSuppressMessages"),l=document.getElementById("settingsSuppressFactionInvites"),c=document.getElementById("settingsSuppressTravelConfirmation"),u=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),m=document.getElementById("settingsSuppressHospitalizationPopup"),h=document.getElementById("settingsSuppressBladeburnerPopup"),p=document.getElementById("settingsAutosaveIntervalValLabel"),d=document.getElementById("settingsDisableHotkeys"),g=document.getElementById("settingsDisableASCIIArt"),f=document.getElementById("settingsDisableTextEffects"),y=document.getElementById("settingsLocale");t.innerHTML=r.a.CodeInstructionRunTime+"ms",a.innerHTML=r.a.MaxLogCapacity,o.innerHTML=r.a.MaxPortCapacity,s.checked=r.a.SuppressMessages,l.checked=r.a.SuppressFactionInvites,c.checked=r.a.SuppressTravelConfirmation,u.checked=r.a.SuppressBuyAugmentationConfirmation,m.checked=r.a.SuppressHospitalizationPopup,h.checked=r.a.SuppressBladeburnerPopup,e(p),d.checked=r.a.DisableHotkeys,g.checked=r.a.CityListView,f.checked=r.a.DisableTextEffects,y.value=r.a.Locale,i.a.updateLocale(r.a.Locale);const _=document.getElementById("settingsNSExecTimeRangeVal"),b=document.getElementById("settingsNSLogRangeVal"),E=document.getElementById("settingsNSPortRangeVal"),v=document.getElementById("settingsAutosaveIntervalVal");_.value=r.a.CodeInstructionRunTime,b.value=r.a.MaxLogCapacity,E.value=r.a.MaxPortCapacity,v.value=r.a.AutosaveInterval,_.oninput=function(){t.innerHTML=this.value+"ms",r.a.CodeInstructionRunTime=this.value},b.oninput=function(){a.innerHTML=this.value,r.a.MaxLogCapacity=this.value},E.oninput=function(){o.innerHTML=this.value,r.a.MaxPortCapacity=this.value},v.oninput=function(){r.a.AutosaveInterval=Number(this.value),e(p),0===Number(this.value)?n.Engine.Counters.autoSaveCounter=1/0:n.Engine.Counters.autoSaveCounter=5*Number(this.value)},s.onclick=function(){r.a.SuppressMessages=this.checked},l.onclick=function(){r.a.SuppressFactionInvites=this.checked},c.onclick=function(){r.a.SuppressTravelConfirmation=this.checked},u.onclick=function(){r.a.SuppressBuyAugmentationConfirmation=this.checked},m.onclick=function(){r.a.SuppressHospitalizationPopup=this.checked},h.onclick=function(){r.a.SuppressBladeburnerPopup=this.checked},d.onclick=function(){r.a.DisableHotkeys=this.checked},g.onclick=function(){r.a.DisableASCIIArt=this.checked},f.onclick=function(){r.a.DisableTextEffects=this.checked},y.onchange=function(){if(!i.a.updateLocale(y.value)){console.warn("Invalid locale for numeral: "+y.value);let e="en";return r.a.Locale=e,void(y.value=e)}r.a.Locale=y.value}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(10);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(697),i=a(157),o=a(32);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(102),i=a(698),o=a(130);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(379),o=a(210);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";a.d(t,"a",(function(){return o}));var n=a(33);const r={Hacking:null,Character:null,World:null,Help:null};function i(e,t,a){for(let a=0;a0?"list-item":"none",this.classList.toggle("opened");const c=[t,r,o,s,l],u=[n.a.Stats,n.a.Factions,n.a.Augmentations,n.a.HacknetNodes,n.a.Sleeves];t.style.maxHeight?i(!1,c,u):i(!0,c,u)},r.World.onclick=function(){const t=a("city-tab"),r=a("travel-tab"),o=a("job-tab"),s=a("stock-market-tab"),l=a("bladeburner-tab"),c=a("corporation-tab"),u=a("gang-tab");o.style.display=""!==e.companyName?"list-item":"none",s.style.display=e.hasWseAccount?"list-item":"none",l.style.display=e.inBladeburner()?"list-item":"none",c.style.display=e.hasCorporation()?"list-item":"none",u.style.display=e.inGang()?"list-item":"none",this.classList.toggle("opened");const m=[t,r,o,s,l,c,u],h=[n.a.City,n.a.Travel,n.a.Job,n.a.StockMarket,n.a.Bladeburner,n.a.Corporation,n.a.Gang];t.style.maxHeight?i(!1,m,h):i(!0,m,h)},r.Help.onclick=function(){const e=a("milestones-tab"),r=a("tutorial-tab"),o=a("options-tab");this.classList.toggle("opened");const s=[e,r,o],l=[n.a.Milestones,n.a.Tutorial,n.a.Options];t&&(s.push(a("dev-tab")),l.push(a("dev-menu-link"))),r.style.maxHeight?i(!1,s,l):i(!0,s,l)},!0}catch(e){return console.error("Failed to initialize Main Menu Headers: "+e),!1}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(22),o=a(102),s=a(2);function l(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(o.a,{headerContent:r.a.createElement(r.a.Fragment,null,t.hostname," (",s.a.formatBigNumber(a),"b)"),panelContent:r.a.createElement("ul",null,n.map(e=>r.a.createElement("li",{key:e.name},e.name,": ",s.a.formatBigNumber(e.size),"b")))})}function c(){const e=[];for(const t of Object.keys(i.b))e.push(t);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",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."),e.map(e=>r.a.createElement(l,{key:e,ip:e})))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";var n=a(1),r=a(164);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(164);!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;u0)return e.ramUsage;const t=n.b[e.server];if(null==t)return 0;for(let a=0;ae.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(102),i=a(3);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(21),o=a(7);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 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";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(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 o})),a.d(t,"b",(function(){return s}));var n=a(202),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 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,"b",(function(){return n})),a.d(t,"a",(function(){return r}));const n="Type 'help name' to learn more about the command 'name'

alias [-g] [name=\"value\"] Create or display Terminal aliases
analyze Get information about the current machine
backdoor Install a backdoor on the current machine
buy [-l/program] Purchase a program through the Dark Web
cat [file] Display a .msg, .lit, or .txt file
cd [dir] Change to a new directory
check [script] [args...] Print a script's logs to Terminal
clear Clear all text on the terminal
cls See 'clear' command
connect [ip/hostname] Connects to a remote server
download [script/text file] Downloads scripts or text files to your computer
expr [math expression] Evaluate a mathematical expression
free Check the machine's memory (RAM) usage
hack Hack the current machine
help [command] Display this help text, or the help text for a command
home Connect to home computer
hostname Displays the hostname of the machine
ifconfig Displays the IP address of the machine
kill [script/pid] [args...] Stops the specified script on the current server
killall Stops all running scripts on the current machine
ls [dir] [| grep pattern] Displays all files on the machine
lscpu Displays the number of CPU cores on the machine
mem [script] [-t] [n] Displays the amount of RAM required to run the script
mv [src] [dest] Move/rename a text or script file
nano [file] Text editor - Open up and edit a script or text file
ps Display all scripts that are currently running
rm [file] Delete a file from the server
run [name] [-t] [n] [args...] Execute a program or script
scan Prints all immediately-available network connections
scan-analyze [d] [-a] Prints info for all servers up to d nodes away
scp [file] [server] Copies a file to a destination server
sudov Shows whether you have root access on this computer
tail [script] [args...] Displays dynamic logs for the specified script
theme [preset] | bg txt hlgt Change the color scheme of the UI
top Displays all running scripts and their RAM usage
unalias [alias name] Deletes the specified alias
wget [url] [target file] Retrieves code/text from a web server
",r={alias:"alias [-g] [name=\"value\"]
Create or display aliases. An alias enables a replacement of a word with another string. It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following:

alias nuke=\"run NUKE.exe\"

Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For example, if the following alias was set:

alias worm=\"HTTPWorm.exe\"

and then you tried to run the following terminal command:

run worm

This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag:

alias -g worm=\"HTTPWorm.exe\"

Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command.

Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal.

The 'unalias' command can be used to remove aliases.

",analyze:"analze
Prints details and statistics about the current server. The information that is printed includes basic server details such as the hostname, whether the player has root access, what ports are opened/closed, and also hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is available on the server, etc.",backdoor:"backdoor
Install a backdoor on the current machine, grants a secret bonus depending on the machine.
Requires root access to run.
",buy:"buy [-l / program]
Purchase a program through the Dark Web. Requires a TOR router to use.

If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the dark web to the Terminal, as well as their costs.

Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.",cat:"cat [file]
Display message (.msg), literature (.lit), or text (.txt) files. Examples:

cat j1.msg
cat foo.lit
cat servers.txt",cd:"cd [dir]
Change to the specified directory. Note that this works even for directories that don't exist. If you change to a directory that does not exist, it will not be 'created'. Examples:

cd scripts/hacking
cd /logs
cd ../",check:"check [script name] [args...]
Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by a space. Remember that a running script is uniquely identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 2 foodnstuff

Then to run the 'check' command on this script you would have to pass the same arguments in:

check foo.script 1 2 foodnstuff",clear:"clear
Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",cls:"cls
Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",connect:"connect [hostname/ip]
Connect to a remote server. The hostname or IP address of the remote server must be given as the argument to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To see which servers can be connected to, use the 'scan' command.",download:"download [script/text file]
Downloads a script or text file to your computer (like your real life computer).
You can also download all of your scripts/text files as a zip file using the following Terminal commands:

Download all scripts and text files: download *
Download all scripts: download *.script
Download all text files: download *.txt
",expr:"expr [mathematical expression]
Evaluate a simple mathematical expression. Supports native JavaScript operators:
+, -, /, *, **, %
Example:
expr 25 * 2 ** 10
Note that letters (non-digits) are not allowed and will be removed from the input.",free:"free
Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as how much of it is being used.",hack:"hack
Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics
",help:"help [command]
Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print more detailed information about the Terminal command. Examples:

help alias
help scan-analyze",home:"home
Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname
Prints the hostname of the current server",ifconfig:"ipconfig
Prints the IP address of the current server",kill:"kill [script name] [args...]
kill [pid]
Kill the script specified by the script name and arguments OR by its PID.

If you are killing the script using its filename and arguments, then each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 sigma-cosmetics

Then to kill this script the same arguments would have to be used:

kill foo.script 1 sigma-cosmetics

If you are killing the script using its PID, then the PID argument must be numeric",killall:"killall
Kills all scripts on the current server. Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. The script will not be stopped/killed until after that time has elapsed.",ls:"ls [dir] [| grep pattern]
The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. The files will be displayed in alphabetical order.

The 'dir' optional parameter can be used to display files/directories in another directory.

The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.

Examples:

List all files with the '.script' extension in the current directory:
ls | grep .script

List all files with the '.js' extension in the root directory:
ls / | grep .js

List all files with the word 'purchase' in the filename, in the 'scripts' directory:
ls scripts | grep purchase",lscpu:"lscpu
Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]
Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then an argument for the number of threads must be passed in afterwards. Examples:

mem foo.script
mem foo.script -t 50
The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example above will print the amount of RAM needed to run 'foo.script' with 50 threads.",mv:"mv [src] [dest]
Move the source file to the specified destination. This can also be used to rename files. This command only works for scripts and text files (.txt). This command CANNOT be used to convert to different file types

Note that, unlike the Linux 'mv' command, the destination argument must be the full filepath. Examples:

mv hacking-controller.script scripts/hacking-controller.script
mv myScript.js myOldScript.js",nano:"nano [file name]
Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be edited using the Text Editor. If the file does not already exist, then a new, empty one will be created",ps:"ps
Prints all scripts that are running on the current server",rm:"rm [file]
Removes the specified file from the current server. A file can be a script, a program, or a message file.

WARNING: This is permanent and cannot be undone",run:"run [file name] [-t] [num threads] [args...]
Execute a program or a script.

The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used to indicate that the script should be run with the specified number of threads. If the flag is omitted, then the script will be run with a single thread by default. If the '-t' flag is used, then it MUST come immediately after the script name, and the [num threads] argument MUST come immediately afterwards.

[args...] represents a variable number of arguments that will be passed into the script. See the documentation about script arguments. Each specified argument must be separated by a space.

",scan:"scan
Prints all immediately-available network connection. This will print a list of all servers that you can currently connect to using the 'connect' Terminal command.","scan-analyze":"scan-analyze [depth] [-a]
Prints detailed information about all servers up to [depth] nodes away on the network. Calling 'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal command. This command also shows the relative paths to reach each server.

By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to 5 and 10, respectively.

The information 'scan-analyze' displays about each server includes whether or not you have root access to it, its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM it has.

By default, this command will not display servers that you have purchased. However, you can pass in the -a flag at the end of the command if you would like to enable that.",scp:"scp [filename] [target server]
Copies the specified file from the current server to the target server. This command only works for script files (.script extension), literature files (.lit extension), and text files (.txt extension). The second argument passed in must be the hostname or IP of the target server.",sudov:"sudov
Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]
Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used to run it. So, if a script was ran with the following arguments:

run foo.script 10 50000

Then in order to check its logs with 'tail' the same arguments must be used:

tail foo.script 10 50000",theme:"theme [preset] | [#background #text #highlight]
Change the color of the game's user interface

This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and must be either 3 or 6 digits. Example:

theme #ffffff #385 #235012

A color picker such as Google's can be used to get your desired hex color values

Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",top:"top
Prints a list of all scripts running on the current server as well as their thread count and how much RAM they are using in total.",unalias:"unalias [alias name]
Deletes the specified alias. Note that the double quotation marks are required.

As an example, if an alias was declared using:

alias r=\"run\"

Then it could be removed using:

unalias r

It is not necessary to differentiate between global and non-global aliases when using 'unalias'",wget:"wget [url] [target file]
Retrieves data from a URL and downloads it to a file on the current server. The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, it will be overwritten by this command.

Note that it will not be possible to download data from many websites because they do not allow cross-origin resource sharing (CORS). Example:

wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt"}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=75},,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(53);function r(e){if(null==e)return null;const t=e.nextPosition;return null==t?null:n.a[t]}},,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(635),i=a(636),o=a(75),s=a(236),l=a(38),c=a(4),u=a(7);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(279),o=a(988);function s(){return(s=Object.assign||function(e){for(var t=1;tr.a.createElement(o.a,s({},e,{classes:{...l(),...e.classes}}))},,,function(e,t,a){"use strict";a.d(t,"b",(function(){return W})),a.d(t,"c",(function(){return U})),a.d(t,"a",(function(){return G}));var n=a(0),r=a.n(n),i=a(687),o=a(59),s=a(688),l=a(4),c=a(17),u=a(124),m=a(49),h=a(75),p=a(18),d=a(6),g=a(2),f=a(20),y=a(7),_=a(130),b=a(71),E=a(60),v=a(30),k=a(57),C=a(154),O=a(240),S=a(123),w=a(142),T=a(140),M=a(79),x=a(375),P=a(10),A=a(120),R=a(265),D=a(689),I=a(690),N=a(691),j=a(31),L=a(143);const B={container:null,docButton:null,faqButton:null,info:null,sleeveList:null,sleeves:null};let F;function W(e){if(f.b.isOn(f.a.Sleeves))try{F=e,B.container=Object(v.a)("div",{class:"generic-menupage-container",id:"sleeves-container",position:"fixed"}),B.info=Object(v.a)("p",{class:"sleeves-page-info",innerHTML:"

Sleeves

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.

Sleeves can be used to perform different tasks synchronously.

"}),B.faqButton=Object(v.a)("button",{class:"std-button",display:"inline-block",innerText:"FAQ",clickListener:()=>{Object(y.a)(s.a,!1)}}),B.docButton=Object(v.a)("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves",innerText:"Documentation",target:"_blank"}),B.sleeveList=Object(v.a)("ul"),B.sleeves=[];for(const t of e.sleeves){const a=H(t,e.sleeves);if(null==a.container)throw new Error("sleeveUi.container is null in createSleevesPage()");B.sleeveList.appendChild(a.container),B.sleeves.push(a)}B.container.appendChild(B.info),B.container.appendChild(B.faqButton),B.container.appendChild(B.docButton),B.container.appendChild(B.sleeveList);const t=document.getElementById("entire-game-container");if(null===t)throw new Error("entire-game-container not found in createSleevesPage()");t.appendChild(B.container)}catch(e){Object(b.a)(e)}}function U(){if(f.b.isOn(f.a.Sleeves)){if(null===F)throw new Error("playerRef is null in updateSleevesPage()");if(null===B.sleeves)throw new Error("UIElems.sleeves is null in updateSleevesPage()");try{for(let e=0;e{Object(y.a)(Object(I.a)(e))}}),a.travelButton=Object(v.a)("button",{class:"std-button",innerText:"Travel",clickListener:()=>{if(null===F)return;const n="sleeve-travel-popup",i=[];i.push(Object(O.a)(n,{class:"std-button"})),i.push(Object(v.a)("p",{innerHTML:`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 ${Object(L.renderToStaticMarkup)(r.a.createElement(P.a,{money:l.a.TravelCost,player:F}))}. It will also CANCEL the sleeve's current task (setting it to idle)`}));for(const r in h.a)e.city!==r&&function(e,r){i.push(Object(v.a)("div",{class:"cmpy-mgmt-find-employee-option",innerText:r,clickListener:()=>{if(null==F)throw new Error("playerRef is null in popupArguments.click()");return F.canAfford(l.a.TravelCost)?(e.city=r,F.loseMoney(l.a.TravelCost),e.resetTaskStatus(),Object(M.a)(n),K(e,a),z(e,a,t),!1):(Object(y.a)("You cannot afford to have this sleeve travel to another city",!1),!1)}}))}(e,r);Object(C.a)(n,i)}}),a.purchaseAugsButton=Object(v.a)("button",{class:"std-button",display:"block",innerText:"Manage Augmentations",clickListener:()=>{if(null==F)throw new Error("playerRef is null in purchaseAugsButton.click()");Object(i.a)(e,F)}}),a.statsPanel.appendChild(a.stats),a.statsPanel.appendChild(a.moreStatsButton),a.statsPanel.appendChild(a.travelButton),e.shock>=100&&a.statsPanel.appendChild(a.purchaseAugsButton),a.taskPanel=Object(v.a)("div",{class:"sleeve-panel",width:"40%"}),a.taskSelector=Object(v.a)("select",{class:"dropdown"}),a.taskSelector.add(Object(k.a)("------")),a.taskSelector.add(Object(k.a)("Work for Company")),a.taskSelector.add(Object(k.a)("Work for Faction")),a.taskSelector.add(Object(k.a)("Commit Crime")),a.taskSelector.add(Object(k.a)("Take University Course")),a.taskSelector.add(Object(k.a)("Workout at Gym")),a.taskSelector.add(Object(k.a)("Shock Recovery")),a.taskSelector.add(Object(k.a)("Synchronize")),a.taskDetailsSelector=Object(v.a)("select",{class:"dropdown"}),a.taskDetailsSelector2=Object(v.a)("select",{class:"dropdown"}),a.taskDescription=Object(v.a)("p"),a.taskProgressBar=Object(v.a)("p"),a.taskSelector.addEventListener("change",()=>{z(e,a,t)}),a.taskSelector.selectedIndex=e.currentTask,a.taskSelector.dispatchEvent(new Event("change")),Y(e,a),a.taskSetButton=Object(v.a)("button",{class:"std-button",innerText:"Set Task",clickListener:()=>{!function(e,t){try{if(null==F)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");if(null==t.taskDescription)throw new Error("elems.taskDescription is null");const a=Object(S.b)(t.taskSelector),n=Object(S.b)(t.taskDetailsSelector),r=Object(S.b)(t.taskDetailsSelector2);let i=!1;switch(a){case"------":t.taskDescription.innerText="This sleeve is currently idle";break;case"Work for Company":i=e.workForCompany(F,n);break;case"Work for Faction":i=e.workForFaction(F,n,r);break;case"Commit Crime":i=e.commitCrime(F,n);break;case"Take University Course":i=e.takeUniversityCourse(F,r,n);break;case"Workout at Gym":i=e.workoutAtGym(F,r,n);break;case"Shock Recovery":e.currentTask=o.a.Recovery,i=e.shockRecovery(F);break;case"Synchronize":i=e.synchronize(F);break;default:console.error("Invalid/Unrecognized taskValue in setSleeveTask(): "+a)}if(i)Y(e,t);else switch(a){case"Work for Faction":t.taskDescription.innerText="Failed to assign sleeve to task. This is most likely because the selected faction does not offer the selected work type.";break;default:t.taskDescription.innerText="Failed to assign sleeve to task. Invalid choice(s)."}if(f.b.isOn(f.a.Sleeves)){if(U(),null==B.sleeves)throw new Error("UIElems.sleeves is null");for(const e of B.sleeves){if(null==e.taskSelector)throw new Error("e.taskSelector is null");e.taskSelector.dispatchEvent(new Event("change"))}}}catch(e){return console.error("Exception caught in setSleeveTask(): "+e),Object(b.a)(e),!1}}(e,a)}}),a.taskPanel.appendChild(a.taskSelector),a.taskPanel.appendChild(a.taskDetailsSelector),a.taskPanel.appendChild(a.taskDetailsSelector2),a.taskPanel.appendChild(a.taskSetButton),a.taskPanel.appendChild(a.taskDescription),a.taskPanel.appendChild(a.taskProgressBar),a.earningsPanel=Object(v.a)("div",{class:"sleeve-panel",width:"35%"}),a.currentEarningsInfo=Object(v.a)("div"),a.totalEarningsButton=Object(v.a)("button",{class:"std-button",innerText:"More Earnings Info",clickListener:()=>{Object(y.a)(Object(N.a)(e))}}),a.earningsPanel.appendChild(a.currentEarningsInfo),a.earningsPanel.appendChild(a.totalEarningsButton),K(e,a),a.container.appendChild(a.statsPanel),a.container.appendChild(a.taskPanel),a.container.appendChild(a.earningsPanel),a):a}function K(e,t){if(f.b.isOn(f.a.Sleeves)){if(null==F)throw new Error("playerRef is null in updateSleeveUi()");if(null==t.taskProgressBar)throw new Error("elems.taskProgressBar is null");if(null==t.stats)throw new Error("elems.stats is null");if(null==t.currentEarningsInfo)throw new Error("elems.currentEarningsInfo is null");if(j.render(Object(D.a)(e),t.stats),e.currentTask===o.a.Crime){const a=[["Money",r.a.createElement(P.a,{money:parseFloat(e.currentTaskLocation)}),"(on success)"],["Hacking Exp",g.a.formatExp(e.gainRatesForTask.hack),"(2x on success)"],["Strength Exp",g.a.formatExp(e.gainRatesForTask.str),"(2x on success)"],["Defense Exp",g.a.formatExp(e.gainRatesForTask.def),"(2x on success)"],["Dexterity Exp",g.a.formatExp(e.gainRatesForTask.dex),"(2x on success)"],["Agility Exp",g.a.formatExp(e.gainRatesForTask.agi),"(2x on success)"],["Charisma Exp",g.a.formatExp(e.gainRatesForTask.cha),"(2x on success)"]];j.render(Object(x.a)("Earnings (Pre-Synchronization)",a),t.currentEarningsInfo),t.taskProgressBar.innerText=Object(_.a)({progress:e.currentTaskTime/e.currentTaskMaxTime,totalTicks:25})}else{const a=[["Money:",Object(A.a)(5*e.gainRatesForTask.money)],["Hacking Exp:",g.a.formatExp(5*e.gainRatesForTask.hack)+" / s"],["Strength Exp:",g.a.formatExp(5*e.gainRatesForTask.str)+" / s"],["Defense Exp:",g.a.formatExp(5*e.gainRatesForTask.def)+" / s"],["Dexterity Exp:",g.a.formatExp(5*e.gainRatesForTask.dex)+" / s"],["Agility Exp:",g.a.formatExp(5*e.gainRatesForTask.agi)+" / s"],["Charisma Exp:",g.a.formatExp(5*e.gainRatesForTask.cha)+" / s"]];if(e.currentTask===o.a.Company||e.currentTask===o.a.Faction){const t=e.getRepGain(F);a.push(["Reputation:",Object(R.a)(5*t)])}j.render(Object(x.a)("Earnings (Pre-Synchronization)",a),t.currentEarningsInfo),t.taskProgressBar.innerText=""}}}const q=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],$=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function z(e,t,a){if(null==F)throw new Error("playerRef is null in updateSleeveTaskSelector()");const n=[];for(const t of a)e!==t&&t.currentTask===o.a.Company&&n.push(t.currentTaskLocation);const r=[];for(const t of a)e!==t&&t.currentTask===o.a.Faction&&r.push(t.currentTaskLocation);if(null===t.taskDetailsSelector)throw new Error("elems.taskDetailsSelector is null");if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector is null");Object(w.a)(t.taskDetailsSelector),Object(w.a)(t.taskDetailsSelector2),t.taskDetailsSelector2=Object(E.a)(t.taskDetailsSelector2);switch(Object(S.b)(t.taskSelector)){case"Work for Company":{let a=0;const r=Object.keys(F.jobs);for(let i=0;i{if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector2 is null");const a=Object(S.b)(t.taskDetailsSelector),n=c.a[a];if(null==n)return void console.warn("Invalid faction name when trying to update Sleeve Task Selector: "+a);const r=n.getInfo();Object(w.a)(t.taskDetailsSelector2);let i=0;r.offerHackingWork&&(t.taskDetailsSelector2.add(Object(k.a)("Hacking Contracts")),e.factionWorkType===u.a.Hacking&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerFieldWork&&(t.taskDetailsSelector2.add(Object(k.a)("Field Work")),e.factionWorkType===u.a.Field&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerSecurityWork&&(t.taskDetailsSelector2.add(Object(k.a)("Security Work")),e.factionWorkType===u.a.Security&&(t.taskDetailsSelector2.selectedIndex=i),++i)}),t.taskDetailsSelector.dispatchEvent(new Event("change"));break}case"Commit Crime":{let a=0;for(const n in m.a){const r=m.a[n].name;if(t.taskDetailsSelector.add(Object(k.a)(r,n)),""===e.crimeType)continue;const i=m.a[e.crimeType];null!==i&&(r===i.name&&(t.taskDetailsSelector.selectedIndex=a),++a)}t.taskDetailsSelector2.add(Object(k.a)("------"));break}case"Take University Course":for(let a=0;aObject(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 r}));var n=a(4);function r(e,t){return e/n.a.DonateMoneyToRepDivisor*t.faction_rep_mult}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(4),r=a(146),i=a(28),o=a(7),s=a(12);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="",t=1){l(this,"cores",1),l(this,"level",1),l(this,"moneyGainRatePerSecond",0),l(this,"onlineTimeSeconds",0),l(this,"ram",1),l(this,"totalMoneyGenerated",0),this.name=e,this.updateMoneyGainRate(t)}calculateCoreUpgradeCost(e=1,t){return Object(r.a)(this.cores,e,t)}calculateLevelUpgradeCost(e=1,t){return Object(r.b)(this.level,e,t)}calculateRamUpgradeCost(e=1,t){return Object(r.e)(this.ram,e,t)}process(e=1){const t=e*n.a.MilliPerCycle/1e3;let a=this.moneyGainRatePerSecond*t;return isNaN(a)&&(console.error(`Hacknet Node ${this.name} calculated earnings of NaN`),a=0),this.totalMoneyGenerated+=a,this.onlineTimeSeconds+=t,a}upgradeCore(e=1,t){this.cores=Math.min(i.a.MaxCores,Math.round(this.cores+e)),this.updateMoneyGainRate(t)}upgradeLevel(e=1,t){this.level=Math.min(i.a.MaxLevel,Math.round(this.level+e)),this.updateMoneyGainRate(t)}upgradeRam(e=1,t){for(let t=0;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(279),o=a(707);function s(){return(s=Object.assign||function(e){for(var t=1;tr.a.createElement(o.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 getAugmentationPrereq(name: string): string[];\n getAugmentationCost(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(17),r=a(32);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 r}));var n=a(0);function r(e,t){return n.createElement(n.Fragment,null,n.createElement("pre",null,e),n.createElement("table",null,n.createElement("tbody",null,t.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,"b",(function(){return b})),a.d(t,"a",(function(){return E}));var n=a(377),r=a(15),i=a(2),o=a(10),s=a(20),l=a(7),c=a(71),u=a(30),m=a(57),h=a(123),p=a(142),d=a(140),g=a(0),f=a(143);const y={container:null,info:null,sortTag:null,sortSelector:null,resleeveList:null,resleeves:null};let _;function b(e){if(s.b.isOn(s.a.Resleeves))try{let t;_=e,y.container=Object(u.a)("div",{class:"generic-menupage-container",id:"resleeves-container",position:"fixed"}),y.info=Object(u.a)("p",{display:"block",innerHTML:"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!

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

NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.",width:"75%"}),0===e.resleeves.length&&(e.resleeves=Object(n.a)()),y.sortTag=Object(u.a)("p",{display:"inline-block",innerText:"Sort By: "}),y.sortSelector=Object(u.a)("select",{class:"dropdown"}),function(e){e.Cost="Cost",e.Hacking="Hacking",e.Strength="Strength",e.Defense="Defense",e.Dexterity="Dexterity",e.Agility="Agility",e.Charisma="Charisma",e.AverageCombatStats="AverageCombat",e.AverageAllStats="AverageAllStats",e.TotalNumAugmentations="TotalNumAugmentations"}(t||(t={})),y.sortSelector.add(Object(m.a)("Cost",t.Cost)),y.sortSelector.add(Object(m.a)("Hacking Level",t.Hacking)),y.sortSelector.add(Object(m.a)("Strength Level",t.Strength)),y.sortSelector.add(Object(m.a)("Defense Level",t.Defense)),y.sortSelector.add(Object(m.a)("Dexterity Level",t.Dexterity)),y.sortSelector.add(Object(m.a)("Agility Level",t.Agility)),y.sortSelector.add(Object(m.a)("Charisma Level",t.Charisma)),y.sortSelector.add(Object(m.a)("Average Combat Stats",t.AverageCombatStats)),y.sortSelector.add(Object(m.a)("Average Stats",t.AverageAllStats)),y.sortSelector.add(Object(m.a)("Number of Augmentations",t.TotalNumAugmentations)),y.resleeveList=Object(u.a)("ul"),y.sortSelector.onchange=()=>{function a(...e){let t=0;for(let a=0;ae.hacking_skill-t.hacking_skill);break;case t.Strength:e.resleeves.sort((e,t)=>e.strength-t.strength);break;case t.Defense:e.resleeves.sort((e,t)=>e.defense-t.defense);break;case t.Dexterity:e.resleeves.sort((e,t)=>e.dexterity-t.dexterity);break;case t.Agility:e.resleeves.sort((e,t)=>e.agility-t.agility);break;case t.Charisma:e.resleeves.sort((e,t)=>e.charisma-t.charisma);break;case t.AverageCombatStats:e.resleeves.sort((e,t)=>a(e.strength,e.defense,e.dexterity,e.agility)-a(t.strength,t.defense,t.dexterity,t.agility));break;case t.AverageAllStats:e.resleeves.sort((e,t)=>a(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-a(t.hacking_skill,t.strength,t.defense,t.dexterity,t.agility,t.charisma));break;case t.TotalNumAugmentations:e.resleeves.sort((e,t)=>e.augmentations.length-t.augmentations.length);break;case t.Cost:default:e.resleeves.sort((e,t)=>e.getCost()-t.getCost())}if(null==y.resleeveList)throw new Error("UIElems.resleeveList is null in sortSelector.click()");if(null==y.resleeves)throw new Error("UIElems.resleeves is null in sortSelector.click()");for(const t of e.resleeves){const e=v(t);if(null==e.container)throw new Error("resleeveUi.container is null in sortSelector.click()");y.resleeveList.appendChild(e.container),y.resleeves.push(e)}},y.sortSelector.dispatchEvent(new Event("change")),y.container.appendChild(y.info),y.container.appendChild(Object(u.a)("br")),y.container.appendChild(y.sortTag),y.container.appendChild(y.sortSelector),y.container.appendChild(y.resleeveList);const a=document.getElementById("entire-game-container");if(null==a)throw new Error("Could not find entire-game-container in createResleevesPage()");a.appendChild(y.container)}catch(e){Object(c.a)(e)}}function E(){y.container instanceof HTMLElement&&Object(d.a)(y.container);for(const e in y)y[e]=null;_=null}function v(e){const t={container:null,statsPanel:null,stats:null,multipliersButton:null,augPanel:null,augSelector:null,augDescription:null,costPanel:null,costText:null,buyButton:null};if(null===_)return t;if(!s.b.isOn(s.a.Resleeves))return t;t.container=Object(u.a)("div",{class:"resleeve-container",display:"block"}),t.statsPanel=Object(u.a)("div",{class:"resleeve-panel",width:"30%"}),t.stats=Object(u.a)("p",{class:"resleeve-stats-text",innerHTML:`Hacking: ${i.a.formatSkill(e.hacking_skill)} (${i.a.formatExp(e.hacking_exp)} exp)
Strength: ${i.a.formatSkill(e.strength)} (${i.a.formatExp(e.strength_exp)} exp)
Defense: ${i.a.formatSkill(e.defense)} (${i.a.formatExp(e.defense_exp)} exp)
Dexterity: ${i.a.formatSkill(e.dexterity)} (${i.a.formatExp(e.dexterity_exp)} exp)
Agility: ${i.a.formatSkill(e.agility)} (${i.a.formatExp(e.agility_exp)} exp)
Charisma: ${i.a.formatSkill(e.charisma)} (${i.a.formatExp(e.charisma_exp)} exp)
# Augmentations: `+e.augmentations.length}),t.multipliersButton=Object(u.a)("button",{class:"std-button",innerText:"Multipliers",clickListener:()=>{Object(l.a)(["

Total Multipliers:

","Hacking Level multiplier: "+i.a.formatPercentage(e.hacking_mult),"Hacking Experience multiplier: "+i.a.formatPercentage(e.hacking_exp_mult),"Strength Level multiplier: "+i.a.formatPercentage(e.strength_mult),"Strength Experience multiplier: "+i.a.formatPercentage(e.strength_exp_mult),"Defense Level multiplier: "+i.a.formatPercentage(e.defense_mult),"Defense Experience multiplier: "+i.a.formatPercentage(e.defense_exp_mult),"Dexterity Level multiplier: "+i.a.formatPercentage(e.dexterity_mult),"Dexterity Experience multiplier: "+i.a.formatPercentage(e.dexterity_exp_mult),"Agility Level multiplier: "+i.a.formatPercentage(e.agility_mult),"Agility Experience multiplier: "+i.a.formatPercentage(e.agility_exp_mult),"Charisma Level multiplier: "+i.a.formatPercentage(e.charisma_mult),"Charisma Experience multiplier: "+i.a.formatPercentage(e.charisma_exp_mult),"Hacking Chance multiplier: "+i.a.formatPercentage(e.hacking_chance_mult),"Hacking Speed multiplier: "+i.a.formatPercentage(e.hacking_speed_mult),"Hacking Money multiplier: "+i.a.formatPercentage(e.hacking_money_mult),"Hacking Growth multiplier: "+i.a.formatPercentage(e.hacking_grow_mult),"Salary multiplier: "+i.a.formatPercentage(e.work_money_mult),"Company Reputation Gain multiplier: "+i.a.formatPercentage(e.company_rep_mult),"Faction Reputation Gain multiplier: "+i.a.formatPercentage(e.faction_rep_mult),"Crime Money multiplier: "+i.a.formatPercentage(e.crime_money_mult),"Crime Success multiplier: "+i.a.formatPercentage(e.crime_success_mult),"Hacknet Income multiplier: "+i.a.formatPercentage(e.hacknet_node_money_mult),"Hacknet Purchase Cost multiplier: "+i.a.formatPercentage(e.hacknet_node_purchase_cost_mult),"Hacknet Level Upgrade Cost multiplier: "+i.a.formatPercentage(e.hacknet_node_level_cost_mult),"Hacknet Ram Upgrade Cost multiplier: "+i.a.formatPercentage(e.hacknet_node_ram_cost_mult),"Hacknet Core Upgrade Cost multiplier: "+i.a.formatPercentage(e.hacknet_node_core_cost_mult),"Bladeburner Max Stamina multiplier: "+i.a.formatPercentage(e.bladeburner_max_stamina_mult),"Bladeburner Stamina Gain multiplier: "+i.a.formatPercentage(e.bladeburner_stamina_gain_mult),"Bladeburner Field Analysis multiplier: "+i.a.formatPercentage(e.bladeburner_analysis_mult),"Bladeburner Success Chance multiplier: "+i.a.formatPercentage(e.bladeburner_success_chance_mult)].join("
"),!1)}}),t.statsPanel.appendChild(t.stats),t.statsPanel.appendChild(t.multipliersButton),t.augPanel=Object(u.a)("div",{class:"resleeve-panel",width:"50%"}),t.augSelector=Object(u.a)("select",{class:"resleeve-aug-selector dropdown"}),t.augDescription=Object(u.a)("p");for(let a=0;a{!function(e){if(null==e.augDescription)throw new Error("elems.augDescription is null in updateAugDescription()");const t=Object(h.b)(e.augSelector),a=r.a[t];if(null==a)return void console.warn("Could not find Augmentation with name "+t);let n=a.info;"string"!=typeof n&&(n=Object(f.renderToStaticMarkup)(n));e.augDescription.innerHTML=n}(t)}),t.augSelector.dispatchEvent(new Event("change")),t.augPanel.appendChild(t.augSelector),t.augPanel.appendChild(t.augDescription);const a=e.getCost();return t.costPanel=Object(u.a)("div",{class:"resleeve-panel",width:"20%"}),t.costText=Object(u.a)("p",{innerHTML:`It costs ${Object(f.renderToStaticMarkup)(g.createElement(o.a,{money:a,player:_}))} to purchase this Sleeve.`}),t.buyButton=Object(u.a)("button",{class:"std-button",innerText:"Purchase",clickListener:()=>{if(null==_)throw new Error("playerRef is null in buyButton.click()");Object(n.b)(e,_)?Object(l.a)(g.createElement(g.Fragment,null,"You re-sleeved for ",g.createElement(o.a,{money:a}),"!"),!1):Object(l.a)("You cannot afford to re-sleeve into this body",!1)}}),t.costPanel.appendChild(t.costText),t.costPanel.appendChild(t.buyButton),t.container.appendChild(t.statsPanel),t.container.appendChild(t.augPanel),t.container.appendChild(t.costPanel),t}},function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(692),r=a(15),i=a(192),o=a(3),s=a(14);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;e0?"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(435),i=a(547),o=a(548),s=a(550),l=a(27),c=a(105);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(15),o=a(3),s=a(27),l=a(105),c=a(303);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(12);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(e.id)}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(90),r=a(41);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 o}));var n=a(0),r=a.n(n),i=a(440);function o(e){return r.a.createElement("div",null,r.a.createElement(i.a,{corp:e.corp,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(316),o=a(441),s=a(21),l=a(447),c=a(40);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,a]=Object(n.useState)("Overview");return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",null,r.a.createElement(i.a,{current:"Overview"===t,key:"overview",onClick:()=>a("Overview"),text:e.corp.name}),e.corp.divisions.map(e=>r.a.createElement(i.a,{current:e.name===t,key:e.name,onClick:()=>a(e.name),text:e.name})),r.a.createElement(u,{corp:e.corp,setDivisionName:a})),r.a.createElement(l.a,{corp:e.corp,divisionName: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(7),o=a(21),s=a(40),l=a(94);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.e)(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";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={name:"",cost:0,desc:""}){n(this,"name",""),n(this,"cost",0),n(this,"desc",""),n(this,"advertisingMult",1),n(this,"employeeChaMult",1),n(this,"employeeCreMult",1),n(this,"employeeEffMult",1),n(this,"employeeIntMult",1),n(this,"productionMult",1),n(this,"productProductionMult",1),n(this,"salesMult",1),n(this,"sciResearchMult",1),n(this,"storageMult",1),this.name=e.name,this.cost=e.cost,this.desc=e.desc,e.advertisingMult&&(this.advertisingMult=e.advertisingMult),e.employeeChaMult&&(this.employeeChaMult=e.employeeChaMult),e.employeeCreMult&&(this.employeeCreMult=e.employeeCreMult),e.employeeEffMult&&(this.employeeEffMult=e.employeeEffMult),e.employeeIntMult&&(this.employeeIntMult=e.employeeIntMult),e.productionMult&&(this.productionMult=e.productionMult),e.productProductionMult&&(this.productProductionMult=e.productProductionMult),e.salesMult&&(this.salesMult=e.salesMult),e.sciResearchMult&&(this.sciResearchMult=e.sciResearchMult),e.storageMult&&(this.storageMult=e.storageMult)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=[{name:"AutoBrew",cost:12e3,desc:"Automatically keep your employees fully caffeinated with coffee injections. This research will keep the energy of all employees at its maximum possible value, for no cost. This will also disable the Coffee upgrade."},{name:"AutoPartyManager",cost:15e3,desc:"Automatically analyzes your employees' happiness and morale and boosts them whenever it detects a decrease. This research will keep the morale and happiness of all employees at their maximum possible values, for no cost. This will also disable the 'Throw Party' feature."},{name:"Automatic Drug Administration",cost:1e4,desc:"Research how to automatically administer performance-enhacing drugs to all of your employees. This unlocks Drug-related Research."},{name:"Bulk Purchasing",cost:5e3,desc:"Research the art of buying materials in bulk. This allows you to purchase any amount of a material instantly."},{name:"CPH4 Injections",cost:25e3,desc:"Develop an advanced and harmless synthetic drug that is administered to employees to increase all of their stats, except experience, by 10%.",employeeCreMult:1.1,employeeChaMult:1.1,employeeEffMult:1.1,employeeIntMult:1.1},{name:"Drones",cost:5e3,desc:"Acquire the knowledge needed to create advanced drones. This research does nothing by itself, but unlocks other Drone-related research."},{name:"Drones - Assembly",cost:25e3,desc:"Manufacture and use Assembly Drones to improve the efficiency of your production lines. This increases all production by 20%.",productionMult:1.2},{name:"Drones - Transport",cost:3e4,desc:"Manufacture and use intelligent Transport Drones to optimize your warehouses. This increases the storage space of all warehouses by 50%.",storageMult:1.5},{name:"Go-Juice",cost:25e3,desc:"Provide employees with Go-Juice, a coffee-derivative that further enhances the brain's dopamine production. This increases the maximum energy of all employees by 10."},{name:"Hi-Tech R&D Laboratory",cost:5e3,desc:"Construct a cutting edge facility dedicated to advanced research and and development. This allows you to spend Scientific Research on powerful upgrades. It also globally increases Scientific Research production by 10%.",sciResearchMult:1.1},{name:"HRBuddy-Recruitment",cost:15e3,desc:"Use automated software to handle the hiring of employees. With this research, each office will automatically hire one employee per market cycle if there is available space."},{name:"HRBuddy-Training",cost:2e4,desc:"Use automated software to handle the training of employees. With this research, each employee hired with HRBuddy-Recruitment will automatically be assigned to 'Training', rather than being unassigned."},{name:"JoyWire",cost:2e4,desc:"A brain implant which is installed in employees, increasing their maximum happiness by 10."},{name:"Market-TA.I",cost:2e4,desc:"Develop advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know what price to sell your Materials/Products at in order to avoid losing sales due to having too high of a mark-up. It also lets you automatically use that sale price."},{name:"Market-TA.II",cost:5e4,desc:"Develop double-advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know how many sales of a Material/Product you lose or gain from having too high or too low or a sale price. It also lets you automatically set the sale price of your Materials/Products at the optimal price such that the amount sold matches the amount produced."},{name:"Overclock",cost:15e3,desc:"Equip employees with a headset that uses transcranial direct current stimulation (tDCS) to increase the speed of their neurotransmitters. This research increases the intelligence and efficiency of all employees by 25%.",employeeEffMult:1.25,employeeIntMult:1.25},{name:"Self-Correcting Assemblers",cost:25e3,desc:"Create assemblers that can be used for universal production. These assemblers use deep learning to improve their efficiency at their tasks. This research increases all production by 10%",productionMult:1.1},{name:"Sti.mu",cost:3e4,desc:"Upgrade the tDCS headset to stimulate regions of the brain that control confidence and enthusiasm. This research increases the max morale of all employees by 10."},{name:"sudo.Assist",cost:15e3,desc:"Develop a virtual assistant AI to handle and manage administrative issues for your corporation."},{name:"uPgrade: Capacity.I",cost:2e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 3 to 4)."},{name:"uPgrade: Capacity.II",cost:3e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 4 to 5)."},{name:"uPgrade: Dashboard",cost:5e3,desc:"Improve the software used to manage the industry's production line for its various products. This allows you to manage the production and sale of a product before it's finished being designed."},{name:"uPgrade: Fulcrum",cost:1e4,desc:"Streamline the manufacturing of this industry's various products. This research increases the production of your products by 5%",productProductionMult:1.05}]},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return Industry}));var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(12),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(18),decimal_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(63),_IndustryData__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(40),_data_Constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(29),_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(35),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(100),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(14),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(445),_OfficeSpace__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(203),_Product__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(217),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(7),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(67),_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(107),_Warehouse__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(144),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(258),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(11);function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class Industry{constructor(e={}){_defineProperty(this,"name",""),_defineProperty(this,"type",_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture),_defineProperty(this,"sciResearch",new _Material__WEBPACK_IMPORTED_MODULE_6__.a({name:"Scientific Research"})),_defineProperty(this,"researched",{}),_defineProperty(this,"reqMats",{}),_defineProperty(this,"prodMats",[]),_defineProperty(this,"products",{}),_defineProperty(this,"makesProducts",!1),_defineProperty(this,"awareness",0),_defineProperty(this,"popularity",0),_defineProperty(this,"startingCost",0),_defineProperty(this,"reFac",0),_defineProperty(this,"sciFac",0),_defineProperty(this,"hwFac",0),_defineProperty(this,"robFac",0),_defineProperty(this,"aiFac",0),_defineProperty(this,"advFac",0),_defineProperty(this,"prodMult",0),_defineProperty(this,"upgrades",Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__.a).length).fill(0)),_defineProperty(this,"state","START"),_defineProperty(this,"newInd",!0),_defineProperty(this,"offices",{[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0}),this.name=e.name?e.name:"",this.type=e.type?e.type:_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0},this.init()}init(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.d[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);switch(this.startingCost=e,this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error("Invalid Industry Type passed into Industry.init(): "+this.type)}}getProductDescriptionText(){if(!this.makesProducts)return"";switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}}getMaximumNumberProducts(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.BaseMaxProducts+e}hasMaximumNumberProducts(){return Object.keys(this.products).length>=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(40);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 l}));var n=a(0),r=a.n(n),i=a(448),o=a(469),s=a(18);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,{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(355),o=a(449),s=a(21),l=a(450);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,{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(29),o=a(21),s=a(7),l=a(94),c=a(74);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.d)(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(451),o=a(455),s=a(459);function l(e){return r.a.createElement("div",null,r.a.createElement("div",{className:"cmpy-mgmt-industry-left-panel"},r.a.createElement(o.a,{player:e.player,corp:e.corp,division:e.division,currentCity:e.city,office:e.office}),r.a.createElement(i.a,{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,{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 _}));var n=a(0),r=a.n(n),i=a(35),o=a(2),s=a(123),l=a(21),c=a(452),u=a(453),m=a(454),h=a(10);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 g(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.corp.rerender(e.player))}},"+"),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.corp.rerender(e.player)}},"-"),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(f,{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(f,{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(f,{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(f,{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(f,{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(f,{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 _(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,{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.corp.rerender(e.player))},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,{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(g,{corp:e.corp,division:e.division,office:e.office,player:e.player}):r.a.createElement(y,{corp:e.corp,division:e.division,office:e.office,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(21),o=a(2),s=a(7),l=a(29);function c(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 c=l.a.OfficeInitialCost*n,u=e.corp.funds.dividedBy(l.a.OfficeInitialCost).toNumber();let m=1;for(n=Math.pow(1.09,t);m<50&&!(n>=u);){const e=Math.pow(1.09,t+m);if(n+e>u)break;n+=e,++m}const h=l.a.OfficeInitialCost*n;function p(t,a){e.corp.funds.lt(t)?Object(s.a)("You don't have enough company funds to purchase this upgrade!"):(e.office.size+=a,e.corp.funds=e.corp.funds.minus(t),Object(s.a)("Office space increased! It can now hold "+e.office.size+" employees"),e.corp.rerender(e.player)),Object(i.b)(e.popupId)}function d(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:()=>p(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(d,{corp:e.corp,cost:a,size:l.a.OfficeInitialSize}),r.a.createElement(d,{corp:e.corp,cost:c,size:5*l.a.OfficeInitialSize}),r.a.createElement(d,{corp:e.corp,cost:h,size:m*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(21),o=a(2),s=a(29),l=a(14),c=a(11),u=a(242),m=a(7);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.corp.rerender(e.player))}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(7),o=a(21),s=a(40),l=a(217);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,g]=Object(n.useState)(null);if(e.division.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);function f(){let t=h,n=d;if((null==t||t<0)&&(t=0),(null==n||n<0)&&(n=0),null==u||""===u)Object(i.a)("You must specify a name for your product!");else if(isNaN(t))Object(i.a)("Invalid value for design investment");else if(isNaN(n))Object(i.a)("Invalid value for marketing investment");else if(e.corp.funds.lt(t+n))Object(i.a)("You don't have enough company funds to make this large of an investment");else{const r=new l.a({name:u.replace(/[<>]/g,""),createCity:a,designCost:t,advCost:n});if(e.division.products[r.name]instanceof l.a)return void Object(i.a)("You already have a product with this name!");e.corp.funds=e.corp.funds.minus(t+n),e.division.products[r.name]=r,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?g(null):g(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&f()},type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Marketing investment"}),r.a.createElement("button",{className:"std-button",onClick:f},"Develop Product"));var y}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(7),o=a(30),s=a(21),l=a(40),c=a(29),u=a(202),m=a(458);function h(e){return Object(n.useEffect)(()=>{{const t=document.getElementById(e.popupId+"-content");null!=t&&(t.style.minHeight="80vh")}const t=l.c[e.industry.type];if(void 0===t)return;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(m.Treant)(a);const n=t.getAllNodes();for(let a=0;a{e.industry.sciResearch.qty>=r.cost?(e.industry.sciResearch.qty-=r.cost,t.research(n[a]),e.industry.researched[n[a]]=!0,Object(i.a)(`Researched ${n[a]}. It may take a market cycle (~${c.a.SecsPerMarketCycle} seconds) before the effects of the Research apply.`),Object(s.b)(e.popupId)):Object(i.a)("You do not have enough Scientific Research for "+r.name)}):console.warn("Could not find Research Tree div for "+o)}const r=document.getElementById(e.popupId+"-content");null!=r&&r.appendChild(Object(o.a)("pre",{display:"block",innerText:`Multipliers from research:\n * Advertising Multiplier: x${t.getAdvertisingMultiplier()}\n * Employee Charisma Multiplier: x${t.getEmployeeChaMultiplier()}\n * Employee Creativity Multiplier: x${t.getEmployeeCreMultiplier()}\n * Employee Efficiency Multiplier: x${t.getEmployeeEffMultiplier()}\n * Employee Intelligence Multiplier: x${t.getEmployeeIntMultiplier()}\n * Production Multiplier: x${t.getProductionMultiplier()}\n * Sales Multiplier: x${t.getSalesMultiplier()}\n * Scientific Research Multiplier: x${t.getScientificResearchMultiplier()}\n * Storage Multiplier: x`+t.getStorageMultiplier()}))}),r.a.createElement("div",{id:e.popupId},r.a.createElement("div",{id:e.popupId+"outer-box"}))}},,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__(29),_OfficeSpace__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(203),_Material__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(100),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(217),_Warehouse__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(144),_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(460),_ExportPopup__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(461),_LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(462),_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(463),_SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(464),_SellProductPopup__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(465),_PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(466),_ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(467),_SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(468),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(2),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(7),_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(21),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(67),_ui_React_Money__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(10),_MoneyCost__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(74),_Helpers__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(289);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_18__.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_19__.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_19__.a,{money:product.pCost+e}))}else if(product.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_18__.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_19__.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_19__.a,{money:product.sCost}));function openSellProductPopup(){const e="cmpy-mgmt-limit-product-production-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_17__.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_17__.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_17__.a)(e,_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__.a,{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_17__.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"))):hasUpgradeDashboard?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,"..."),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),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,"..."),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"))}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_17__.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_17__.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_18__.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_19__.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_19__.a,{money:mat.bCost+markupLimit}));else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_18__.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_19__.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_19__.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_17__.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_17__.a)(e,_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__.a,{mat:mat,industry:division,corp:props.corp,popupId:e})}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},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",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";let r="This Industry uses ["+Object.keys(e.division.reqMats).join(", ")+"] in order to ";e.division.prodMats.length>0?(r+="produce ["+e.division.prodMats.join(", ")+"] ",e.division.makesProducts&&(r+=" and "+e.division.getProductDescriptionText())):e.division.makesProducts&&(r+=e.division.getProductDescriptionText()+".");const i=[];for(const t in e.division.reqMats)if(e.division.reqMats.hasOwnProperty(t)){const a=[" *",e.division.reqMats[t],t].join(" ");i.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:t},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,a)))}let o,s="in order to create ";switch(e.division.prodMats.length>0?(s+="one of each produced Material ("+e.division.prodMats.join(", ")+") ",e.division.makesProducts&&(s+="or to create one of its Products")):e.division.makesProducts&&(s+="one of its Products"),e.division.state){case"START":o="Current state: Preparing...";break;case"PURCHASE":o="Current state: Purchasing materials...";break;case"PRODUCTION":o="Current state: Producing materials and/or products...";break;case"SALE":o="Current state: Selling materials and/or products...";break;case"EXPORT":o="Current state: Exporting materials and/or products...";break;default:console.error("Invalid state: "+e.division.state)}const l=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof _Material__WEBPACK_IMPORTED_MODULE_3__.a&&Object(_Helpers__WEBPACK_IMPORTED_MODULE_21__.a)(t,e.division)&&l.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent,{city:e.currentCity,corp:e.corp,division:e.division,key:t,mat:e.warehouse.materials[t],warehouse:e.warehouse}));const c=[];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&&c.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent,{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.corp.rerender(e.player))}},"Upgrade Warehouse Size -"," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_20__.a,{money:a,corp:e.corp})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,r,". The exact requirements for production are:"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),i,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,s),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,o),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_17__.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")),l,c)}():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,void(e.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_16__.a)("You do not have enough funds to do this!"):(t.warehouses[a]=new _Warehouse__WEBPACK_IMPORTED_MODULE_5__.a({corp:e.corp,industry:t,loc:a,size:_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialSize}),e.corp.funds=e.corp.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost),e.corp.rerender(e.player)));var t,a}},"Purchase Warehouse (",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_20__.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(21);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.corp.rerender(e.player)}},"Discontinue"))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return ExportPopup}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(7),_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(21);function ExportPopup(props){if(0===props.corp.divisions.length)throw new Error("Export popup created with no divisions.");if(0===Object.keys(props.corp.divisions[0].warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[industry,setIndustry]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(props.corp.divisions[0].name),[city,setCity]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(Object.keys(props.corp.divisions[0].warehouses)[0]),[amt,setAmt]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),setRerender=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1)[1];function rerender(){setRerender(e=>!e)}function onCityChange(e){setCity(e.target.value)}function onIndustryChange(e){setIndustry(e.target.value)}function onAmtChange(e){setAmt(e.target.value)}function exportMaterial(){const industryName=industry,cityName=city;let sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");let temp=sanitizedAmt.replace(/MAX/g,"1");try{temp=eval(temp)}catch(e){return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__.a)("Invalid expression entered for export amount: "+e)}const n=parseFloat(temp);if(null==n||isNaN(n)||n<0)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__.a)("Invalid amount entered for export");const exportObj={ind:industryName,city:cityName,amt:sanitizedAmt};props.mat.exp.push(exportObj),Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__.b)(props.popupId)}function removeExport(e){for(let t=0;te.name===industry);return 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("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."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("select",{className:"dropdown",onChange:onIndustryChange,defaultValue:industry},props.corp.divisions.map(e=>react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("option",{key:e.name,value:e.name},e.name))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("select",{className:"dropdown",onChange:onCityChange,defaultValue:city},currentDivision&&Object.keys(currentDivision.warehouses).map(e=>{if(0!==currentDivision.warehouses[e])return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("option",{key:e,value:e},e)})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{className:"text-input",placeholder:"Export amount / s",onChange:onAmtChange}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:exportMaterial},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.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."),props.mat.exp.map((e,t)=>react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:t,className:"cmpy-mgmt-existing-export",onClick:()=>removeExport(e)},"Industry: ",e.ind,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"City: ",e.city,react__WEBPACK_IMPORTED_MODULE_0___default.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(7),o=a(21);function s(e){const[t,a]=Object(n.useState)(null);function s(){if(null===t)return e.product.prdman[e.city][0]=!1,void Object(o.b)(e.popupId);const a=t;isNaN(a)?Object(i.a)("Invalid value entered"):(a<0?e.product.prdman[e.city][0]=!1:(e.product.prdman[e.city][0]=!0,e.product.prdman[e.city][1]=a),Object(o.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(7),o=a(21),s=a(94);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.f)(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(7),o=a(21),s=a(94);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.g)(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(7),o=a(21),s=a(107),l=a(2),c=a(94);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.a)(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(94),o=a(289),s=a(100);function l(e){const[t,a]=Object(n.useState)(!!e.warehouse.smartSupplyUseLeftovers[e.matName]);const i=e.matName+"-use-leftovers";return r.a.createElement("div",{key:e.matName},r.a.createElement("label",{style:{color:"white"},htmlFor:i},e.warehouse.materials[e.matName].name),r.a.createElement("input",{type:"checkbox",id:i,onChange:function(t){e.warehouse.smartSupplyUseLeftovers[e.matName]=t.target.checked,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 s.a&&Object(o.a)(t,e.division)&&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.h)(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";a.d(t,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(470),o=a(471),s=a(472),l=a(473),c=a(474),u=a(475),m=a(476),h=a(477),p=a(478),d=a(29),g=a(255),f=a(256),y=a(4),_=a(2),b=a(11),E=a(21),v=a(10);function k(e){function t(e){let t=e.className?e.className:"std-button";const a=null!=e.tooltip;return a&&(t+=" tooltip"),r.a.createElement("a",{className:t,onClick:e.onClick,style:{display:e.display?e.display:"block"}},e.text,a&&r.a.createElement("span",{className:"tooltiptext"},e.tooltip))}function a(){Object(E.a)("corp-bribe-popup",s.a,{player:e.player,popupId:"corp-bribe-popup",corp:e.corp})}const n=e.corp.revenue.minus(e.corp.expenses).toNumber();function k(e){return e.mult<=1?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,e.name,_.a.format(e.mult,"0.000"),r.a.createElement("br",null))}function C(){const t="cmpy-mgmt-find-investors-popup";Object(E.a)(t,h.a,{player:e.player,popupId:t,corp:e.corp})}function O(){const t="cmpy-mgmt-go-public-popup";Object(E.a)(t,p.a,{player:e.player,popupId:t,corp:e.corp})}function S(){const t="cmpy-mgmt-sell-shares-popup";Object(E.a)(t,l.a,{corp:e.corp,player:e.player,popupId:t})}function w(){const t="corp-buyback-shares-popup";Object(E.a)(t,c.a,{player:e.player,popupId:t,corp:e.corp})}function T(){const t="cmpy-mgmt-issue-new-shares-popup";Object(E.a)(t,m.a,{popupId:t,corp:e.corp})}function M(){const t="cmpy-mgmt-issue-dividends-popup";Object(E.a)(t,u.a,{popupId:t,corp:e.corp})}return r.a.createElement("div",null,r.a.createElement("p",null,"Total Funds: ",r.a.createElement(v.a,{money:e.corp.funds.toNumber()}),r.a.createElement("br",null),"Total Revenue: ",r.a.createElement(v.a,{money:e.corp.revenue.toNumber()})," / s",r.a.createElement("br",null),"Total Expenses: ",r.a.createElement(v.a,{money:e.corp.expenses.toNumber()})," / s",r.a.createElement("br",null),"Total Profits: ",r.a.createElement(v.a,{money:n})," / s",r.a.createElement("br",null),r.a.createElement((function(){if(e.corp.dividendPercentage<=0||n<=0)return r.a.createElement(r.a.Fragment,null);const t=e.corp.dividendPercentage/100*n,a=n-t,i=t/e.corp.totalShares,o=e.corp.numShares*i;return r.a.createElement(r.a.Fragment,null,"Retained Profits (after dividends): ",r.a.createElement(v.a,{money:a})," / s",r.a.createElement("br",null),r.a.createElement("br",null),"Dividend Percentage:"," ",_.a.format(e.corp.dividendPercentage/100,"0%"),r.a.createElement("br",null),"Dividends per share: ",r.a.createElement(v.a,{money:i})," / s",r.a.createElement("br",null),"Your earnings as a shareholder (Pre-Tax):"," ",r.a.createElement(v.a,{money:o})," / s",r.a.createElement("br",null),"Dividend Tax Rate: ",e.corp.dividendTaxPercentage,"%",r.a.createElement("br",null),"Your earnings as a shareholder (Post-Tax):"," ",r.a.createElement(v.a,{money:o*(1-e.corp.dividendTaxPercentage/100)})," ","/ s",r.a.createElement("br",null),r.a.createElement("br",null))}),null),"Publicly Traded: ",e.corp.public?"Yes":"No",r.a.createElement("br",null),"Owned Stock Shares:"," ",_.a.format(e.corp.numShares,"0.000a"),r.a.createElement("br",null),"Stock Price:"," ",e.corp.public?r.a.createElement(v.a,{money:e.corp.sharePrice}):"N/A",r.a.createElement("br",null)),r.a.createElement("p",{className:"tooltip"},"Total Stock Shares:"," ",_.a.format(e.corp.totalShares,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Outstanding Shares:"," ",_.a.format(e.corp.issuedShares,"0.000a"),r.a.createElement("br",null),"Private Shares:"," ",_.a.format(e.corp.totalShares-e.corp.issuedShares-e.corp.numShares,"0.000a"))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(k,{name:"Production Multiplier: ",mult:e.corp.getProductionMultiplier()}),r.a.createElement(k,{name:"Storage Multiplier: ",mult:e.corp.getStorageMultiplier()}),r.a.createElement(k,{name:"Advertising Multiplier: ",mult:e.corp.getAdvertisingMultiplier()}),r.a.createElement(k,{name:"Empl. Creativity Multiplier: ",mult:e.corp.getEmployeeCreMultiplier()}),r.a.createElement(k,{name:"Empl. Charisma Multiplier: ",mult:e.corp.getEmployeeChaMultiplier()}),r.a.createElement(k,{name:"Empl. Intelligence Multiplier: ",mult:e.corp.getEmployeeIntMultiplier()}),r.a.createElement(k,{name:"Empl. Efficiency Multiplier: ",mult:e.corp.getEmployeeEffMultiplier()}),r.a.createElement(k,{name:"Sales Multiplier: ",mult:e.corp.getSalesMultiplier()}),r.a.createElement(k,{name:"Scientific Research Multiplier: ",mult:e.corp.getScientificResearchMultiplier()}),r.a.createElement("br",null),r.a.createElement((function(){const t=e.corp.storedCycles*y.a.MilliPerCycle;return t<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,"Bonus time: ",Object(b.b)(t),r.a.createElement("br",null),r.a.createElement("br",null))}),null),r.a.createElement("div",null,r.a.createElement(t,{className:"a-link-button",display:"inline-block",onClick:()=>e.corp.getStarterGuide(e.player),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.corp.public?r.a.createElement((function(){const a=e.corp,n=a.shareSaleCooldown>0,i=n?"a-link-button-inactive":"std-button",o=n?"Cannot sell shares for "+a.convertCooldownToString(a.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=a.issueNewSharesCooldown>0,l=s?"a-link-button-inactive":"std-button",c=s?"Cannot issue new shares for "+a.convertCooldownToString(a.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.a.createElement(r.a.Fragment,null,r.a.createElement(t,{className:i,display:"inline-block",onClick:S,text:"Sell Shares",tooltip:o}),r.a.createElement(t,{className:"std-button",display:"inline-block",onClick:w,text:"Buyback shares",tooltip:"Buy back shares you that previously issued or sold at market price."}),r.a.createElement("br",null),r.a.createElement(t,{className:l,display:"inline-block",onClick:T,text:"Issue New Shares",tooltip:c}),r.a.createElement(t,{className:"std-button",display:"inline-block",onClick:M,text:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)"}),r.a.createElement("br",null))}),null):r.a.createElement((function(){const a=e.corp.fundingRound<4,n=a?"std-button":"a-link-button-inactive",i=a?"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(t,{className:n,onClick:C,text:"Find Investors",tooltip:i,display:"inline-block"}),r.a.createElement(t,{className:"std-button",onClick:O,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))}),null),r.a.createElement((function(){const n=e.corp.determineValuation()>=d.a.BribeThreshold||!0,i=n?"a-link-button":"a-link-button-inactive";return r.a.createElement(t,{className:i,display:"inline-block",onClick:a,text:"Bribe Factions",tooltip:n?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"})}),null)),r.a.createElement("br",null),r.a.createElement((function(){return e.corp.divisions.length<=0?r.a.createElement(r.a.Fragment,null):r.a.createElement("div",{className:"cmpy-mgmt-upgrade-container"},r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Unlocks "),Object.values(g.a).filter(t=>0===e.corp.unlockUpgrades[t[0]]).map(t=>r.a.createElement(o.a,{player:e.player,corp:e.corp,upgradeData:t,key:t[0]})),r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Upgrades "),e.corp.upgrades.map((e,t)=>f.a[t]).map(t=>r.a.createElement(i.a,{player:e.player,corp:e.corp,upgrade:t,key:t[0]})))}),null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(7),o=a(94),s=a(74);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("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(c)){try{Object(o.c)(e.corp,e.upgrade)}catch(e){Object(i.a)(e+"")}e.corp.rerender(e.player)}}},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(7),o=a(94),s=a(74);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("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(t[1])){try{Object(o.i)(e.corp,e.upgradeData)}catch(e){Object(i.a)(e+"")}e.corp.rerender(e.player)}}},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(17),o=a(29),s=a(2),l=a(21),c=a(7);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(7),s=a(21),l=a(29);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.corp.rerender(e.player)}}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(21),o=a(2),s=a(7);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.corp.rerender(e.player)}}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(21),o=a(7),s=a(29),l=a(94);function c(e){const[t,a]=Object(n.useState)(null);function c(){if(null!==t){try{Object(l.b)(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(7),s=a(21),l=a(14),c=a(29);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(21),o=a(2),s=a(29);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.corp.rerender(e.player),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(7),o=a(21),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.corp.rerender(e.player),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 d}));var n=a(480),r=a(481),i=a(540),o=a(541),s=a(542),l=a(546),c=a(205),u=a(18),m=a(209),h=a(12),p=a(63);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=0,this.corporation=0,this.bladeburner=0,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.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(23);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(104),r=a(44);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 O}));var n=a(16),r=a(6);const i={},o={},s={},l={},c={},u={},m={},h={},p={},d={},g={},f={},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 i=[{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:r(1),time:n.a.MillisecondsPerFiveMinutes}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:r(50),time:2*n.a.MillisecondsPerFiveMinutes}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:r(100),time:n.a.MillisecondsPerHalfHour}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:r(250),time:n.a.MillisecondsPer2Hours}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:r(500),time:n.a.MillisecondsPer4Hours}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:r(750),time:n.a.MillisecondsPer8Hours}},{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:r(75),time:n.a.MillisecondsPerQuarterHour}},{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:r(400),time:n.a.MillisecondsPer2Hours}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:r(75),time:n.a.MillisecondsPerHalfHour}},{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:r(25),time:n.a.MillisecondsPerQuarterHour}},{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}},{key:"Flight",name:"fl1ght.exe",create:null}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(486),i=a(489),o=a(494),s=a(211),l=a(4),c=a(5),u=a(208),m=a(44),h=a(47);const p=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];class d extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1,purchasingAugs:!!e.initiallyOnAugmentationsPage&&e.initiallyOnAugmentationsPage},this.manageGang=this.manageGang.bind(this),this.rerender=this.rerender.bind(this),this.routeToMain=this.routeToMain.bind(this),this.routeToPurchaseAugs=this.routeToPurchaseAugs.bind(this),this.sleevePurchases=this.sleevePurchases.bind(this),this.startFieldWork=this.startFieldWork.bind(this),this.startHackingContracts=this.startHackingContracts.bind(this),this.startHackingMission=this.startHackingMission.bind(this),this.startSecurityWork=this.startSecurityWork.bind(this)}manageGang(){if(this.props.p.inGang())return this.props.engine.loadGangContent();const e=this.props.faction.name;let t=!1;"NiteSec"!==e&&"The Black Hand"!==e||(t=!0);const a=Object(h.d)(),n=Object(h.c)();if(null==a||null==n)return;a.innerHTML="Create Gang",a.addEventListener("click",()=>{this.props.p.startGang(e,t);const a=document.getElementById("world-menu-header");a instanceof HTMLElement&&(a.click(),a.click()),this.props.engine.loadGangContent(),Object(h.a)()}),n.innerHTML="Cancel",n.addEventListener("click",()=>{Object(h.a)()});let r="";r=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.

",Object(h.b)(`Would you like to create a new Gang with ${e}?

Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.

`+r+"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.")}rerender(){this.setState(e=>({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,d="The Covenant"===t.name&&e.bitNodeN>=10&&m.a[10];let g=e.canAccessGang()&&p.includes(t.name);return e.inGang()&&(e.getGangName()!==t.name?g=!1:e.getGangName()===t.name&&(g=!0)),n.createElement("div",null,n.createElement("h1",null,t.name),n.createElement(o.a,{faction:t,factionInfo:a}),g&&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}),d&&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("div",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(487),i=a(15),o=a(3),s=a(105),l=a(27),c=a(19);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)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(69),i=a(15),o=a(3),s=a(27),l=a(10),c=a(64),u=a(19),m=a(488);const h={margin:"4px",padding:"4px"},p={display:"inline-block"};class d extends n.Component{constructor(e){super(e);const t=i.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(){s.a.SuppressBuyAugmentationConfirmation?Object(r.g)(this.aug,this.props.faction):Object(r.h)(this.aug,this.props.faction)}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),s="";this.hasPrereqs()?this.aug.name!==o.a.NeuroFluxGovernor&&(this.aug.owned||this.owned())?a=!0:this.hasReputation()?i=n.createElement(n.Fragment,null,"UNLOCKED (at ",Object(c.a)(t)," faction reputation) -"," ",n.createElement(l.a,{money:e,player:this.props.p})):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",Object(c.a)(t)," faction reputation -"," ",n.createElement(l.a,{money:e,player:this.props.p}),")"),s="red"):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",this.aug.prereqs.map(e=>Object(m.a)(e))," as prerequisite)"),s="red");const d={display:"inline-block"};""!==s&&(d.color=s);let g=this.aug.name;this.aug.name===o.a.NeuroFluxGovernor&&(g+=" - Level "+Object(r.b)());let f=n.createElement(n.Fragment,null);return f="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",null,n.createElement("span",{style:h},n.createElement(u.a,{disabled:a,onClick:this.handleClick,style:p,text:g,tooltip:f}),n.createElement("p",{style:d},i)))}}},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(4),o=a(357),s=a(10),l=a(64),c=a(19),u=a(2),m=a(7),h=a(165);const p={margin:"5px",height:"26px"};function d(e){const[t,a]=Object(n.useState)(null),d=(i.a.DonateMoneyToRepDivisor+"").length-1;function g(){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(!g())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||!g()}),r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):g()?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(495),i=a(496),o=a(64),s=a(243),l=a(165);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(498),o=a(189),s=a(208),l=a(259),c=a(19),u=a(10),m=a(7);function h(){return(h=Object.assign||function(e){for(var t=1;t=s.b&&(g=!0);const f=[];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."),f)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(499);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(19),o=a(10);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(16);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(31),i=a(55),o=a(140);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 c}));var n=a(69),r=a(24),i=a(1),o=a(60),s=a(20);function l(){document.getElementById("faction-invitation-box-container").style.display="none"}function c(e){var t;t="You have received a faction invitation from "+e.name,document.getElementById("faction-invitation-box-text").innerHTML=t,e.alreadyInvited=!0,i.a.factionInvitations.push(e.name),s.b.isOn(s.a.Factions)&&r.Engine.loadFactionsContent(),Object(o.a)("faction-invitation-box-yes").addEventListener("click",(function(){return-1===i.a.factionInvitations.findIndex(t=>t===e.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(n.e)(e),l(),s.b.isOn(s.a.Factions)&&r.Engine.loadFactionsContent(),!1})),Object(o.a)("faction-invitation-box-no").addEventListener("click",(function(){return l(),!1})),document.getElementById("faction-invitation-box-container").style.display="flex"}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(14);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,u),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)):a.keyCode===i.a.ESC&&(a.preventDefault(),e.onClose())}}),r.a.createElement(l.a,{popup:e.popupId,onClose:()=>e.onAttempt(t),text:"Solve"}),r.a.createElement(l.a,{popup:e.popupId,onClose:e.onClose,text:"Close"}))}},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(10);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",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";a.d(t,"a",(function(){return r}));const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function r(e){let t="";for(let a=0;a=i.a.MaxLevel)n=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),u="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.f)(e,i.a.MaxLevel);else{const n=i.a.MaxLevel-e.level;a=Math.min(n,t)}const c=e.calculateLevelUpgradeCost(a,s.a.hacknet_node_level_cost_mult);n=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:c,player:s.a})),u=s.a.money.lt(c)?"std-button-disabled":"std-button"}let m,h;if(e.ram>=i.a.MaxRam)m=r.a.createElement(r.a.Fragment,null,"MAX RAM"),h="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.g)(e,i.a.MaxRam);else{const n=Math.round(Math.log2(i.a.MaxRam/e.ram));a=Math.min(n,t)}const n=e.calculateRamUpgradeCost(a,s.a.hacknet_node_ram_cost_mult);m=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),h=s.a.money.lt(n)?"std-button-disabled":"std-button"}let p,d;if(e.cores>=i.a.MaxCores)p=r.a.createElement(r.a.Fragment,null,"MAX CORES"),d="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.e)(e,i.a.MaxCores);else{const n=i.a.MaxCores-e.cores;a=Math.min(n,t)}const n=e.calculateCoreUpgradeCost(a,s.a.hacknet_node_core_cost_mult);p=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),d=s.a.money.lt(n)?"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"}},e.name)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},r.a.createElement(l.a,{money:e.totalMoneyGenerated,player:s.a})," (",Object(c.a)(e.moneyGainRatePerSecond),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:u,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.f)(e,i.a.MaxLevel)),Object(o.o)(e,n),a(),!1}},n)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.ram,"GB"),r.a.createElement("button",{className:h,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.g)(e,i.a.MaxRam)),Object(o.p)(e,n),a(),!1}},m)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:d,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.e)(e,i.a.MaxCores)),Object(o.l)(e,n),a(),!1}},p))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(28),o=a(37),s=a(1),l=a(10),c=a(156),u=a(296);class m extends r.a.Component{render(){const e=this.props.node,t=this.props.purchaseMultiplier,a=this.props.recalculate;let n,m;if(e.level>=i.b.MaxLevel)n=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),m="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.f)(e,i.b.MaxLevel);else{const n=i.b.MaxLevel-e.level;a=Math.min(n,t)}const c=e.calculateLevelUpgradeCost(a,s.a.hacknet_node_level_cost_mult);n=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:c,player:s.a})),m=s.a.money.lt(c)?"std-button-disabled":"std-button"}let h,p;if(e.maxRam>=i.b.MaxRam)h=r.a.createElement(r.a.Fragment,null,"MAX RAM"),p="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.g)(e,i.b.MaxRam);else{const n=Math.round(Math.log2(i.b.MaxRam/e.maxRam));a=Math.min(n,t)}const n=e.calculateRamUpgradeCost(a,s.a.hacknet_node_ram_cost_mult);h=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),p=s.a.money.lt(n)?"std-button-disabled":"std-button"}let d,g;if(e.cores>=i.b.MaxCores)d=r.a.createElement(r.a.Fragment,null,"MAX CORES"),g="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.e)(e,i.b.MaxCores);else{const n=i.b.MaxCores-e.cores;a=Math.min(n,t)}const n=e.calculateCoreUpgradeCost(a,s.a.hacknet_node_core_cost_mult);d=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),g=s.a.money.lt(n)?"std-button-disabled":"std-button"}let f,y;if(e.cache>=i.b.MaxCache)f=r.a.createElement(r.a.Fragment,null,"MAX CACHE"),y="std-button-disabled";else{let a=0;if("MAX"===t)a=Object(o.d)(e,i.b.MaxCache);else{const n=i.b.MaxCache-e.cache;a=Math.min(n,t)}const n=e.calculateCacheUpgradeCost(a);f=r.a.createElement(r.a.Fragment,null,"Upgrade x",a," -"," ",r.a.createElement(l.a,{money:n,player:s.a})),y=s.a.money.lt(n)?"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"}},e.hostname)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(c.a)(e.totalHashesGenerated)," (",Object(u.a)(e.hashRate),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Hash Capacity:"),r.a.createElement("span",{className:"text"},Object(c.a)(e.hashCapacity))),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:m,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.f)(e,i.b.MaxLevel)),Object(o.o)(e,n),a(),!1}},n)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.maxRam,"GB"),r.a.createElement("button",{className:p,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.g)(e,i.b.MaxRam)),Object(o.p)(e,n),a(),!1}},h)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:g,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.e)(e,i.b.MaxCores)),Object(o.l)(e,n),a(),!1}},d)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cache Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.cache),r.a.createElement("button",{className:y,onClick:()=>{let n=t;return"MAX"===t&&(n=Object(o.d)(e,i.b.MaxCache)),Object(o.k)(e,n),a(),Object(o.r)(),!1}},f))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(37),o=a(205),s=a(160),l=a(1),c=a(2),u=a(360),m=a(7),h=a(95),p=a(156);class d extends r.a.Component{constructor(e){super(e),this.state={selectedServer:"ecorp"},this.changeTargetServer=this.changeTargetServer.bind(this),this.purchase=this.purchase.bind(this,this.props.hashManager,this.props.upg)}changeTargetServer(e){this.setState({selectedServer:e.target.value})}purchase(e,t){if(e.hashes>=e.getUpgradeCost(t.name)){Object(i.n)(t.name,this.state.selectedServer)?this.props.rerender():Object(m.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 this upgrade affects.")}}render(){const e=this.props.hashManager,t=this.props.upg,a=e.getUpgradeCost(t.name),n=e.upgrades[t.name],i=t.effectText(n),o=e.hashes>=a?"std-button":"std-button-disabled";return r.a.createElement("div",{className:"bladeburner-action"},r.a.createElement(h.b,{value:t.name}),r.a.createElement("p",null,"Cost: ",Object(p.a)(a),", Bought: ",n," times"),r.a.createElement("p",null,t.desc),r.a.createElement("button",{className:o,onClick:this.purchase},"Purchase"),n>0&&i&&r.a.createElement("p",null,i),t.hasTargetServer&&r.a.createElement(u.a,{serverType:u.b.Foreign,onChange:this.changeTargetServer,style:{margin:"5px"}}))}}class g extends r.a.Component{constructor(e){super(e),this.state={totalHashes:l.a.hashManager.hashes}}componentDidMount(){this.interval=setInterval(()=>this.tick(),1e3)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState({totalHashes:l.a.hashManager.hashes})}render(){const e=this.props.rerender,t=l.a.hashManager;if(!(t instanceof o.a))throw new Error("Player does not have a HashManager)");const a=Object.keys(s.a).map(a=>{const n=s.a[a];return r.a.createElement(d,{upg:n,hashManager:t,key:n.name,rerender:e})});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: ",c.a.formatHashes(this.state.totalHashes)),a)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(295);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;s
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(299),r=a(122),i=a(147),o=a(48),s=a(12);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";a.d(t,"a",(function(){return u}));var n=a(76),r=a(521),i=a(77),o=a(168),s=a(88),l=a(22);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="",g=null;function f(){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 _(){for(const e of p.programs)m.push(e)}function b(){for(const e of h.scripts){const t=k(e.filename);t&&m.push(t)}}function E(){for(const e of h.textFiles){const t=k(e.fn);t&&m.push(t)}}function v(){const e=Object(r.a)(h,null==g?"/":g);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=document.getElementById("terminal-input-text-box");if(null==i)return void console.warn("Couldn't find terminal input DOM element (id=terminal-input-text-box) when trying to autocomplete");const o=i,s=o.value.lastIndexOf(";");let l="";if(0!==a.length)if(1===a.length)l=""===t?a[0]+" ":e+" "+a[0],o.value=-1===s?l:o.value.slice(0,s+1)+" "+l,o.focus();else{const i=Object(r.e)(a);let l="";for(let e=0;e "+e),Object(n.c)(l)):(o.value=-1===s?i:`${o.value.slice(0,s+1)} ${i}`,o.focus()):i===t?(Object(n.c)("> "+e+" "+t),Object(n.c)(l)):(o.value=-1==s?`${e} ${i}`:`${o.value.slice(0,s+1)} ${e} ${i}`,o.focus())}}},,,,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(56),r=a(6);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(529),i=a(530);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",null,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(162),i=a(4),o=a(19),s=a(166),l=a(10),c=a(7);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(531),i=a(228),o=a(82),s=a(536);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 _}));var n,r=a(0),i=a(532),o=a(533),s=a(535),l=a(273),c=a(116),u=a(66),m=a(46),h=a(44),p=a(2),d=a(102),g=a(10),f=a(7),y=a(47);!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(n||(n={}));class _ extends r.Component{constructor(e){super(e),this.state={orderType:n.Market,position:m.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)}createPlaceOrderPopupBox(e,t,a){const n=Object(y.i)(),r=Object(y.h)();n.innerText=e,n.addEventListener("click",()=>{const e=parseFloat(Object(y.g)());if(isNaN(e))return Object(f.a)("Invalid input for price: "+Object(y.g)()),!1;a(e),Object(y.e)()}),r.innerText="Cancel Order",r.addEventListener("click",()=>{Object(y.e)()}),Object(y.f)(t)}getBuyTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;const a=Object(c.b)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Purchasing ",p.a.formatShares(t)," shares (",this.state.position===m.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===m.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(c.c)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Selling ",p.a.formatShares(t)," shares (",this.state.position===m.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(f.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.buyStockShort(this.props.stock,e):this.props.buyStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:this.createPlaceOrderPopupBox("Place Buy Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.LimitBuy,this.state.position)});break;case n.Stop:this.createPlaceOrderPopupBox("Place Buy Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.StopBuy,this.state.position)})}}handleBuyMaxButtonClick(){const e=this.props.p.money.toNumber(),t=this.props.stock;let a=Object(c.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===m.a.Short?this.props.buyStockShort(t,a):this.props.buyStockLong(t,a),this.props.rerenderAllTickers();break;default:Object(f.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===m.a.Short?this.setState({position:m.a.Short}):this.setState({position:m.a.Long})}handleQuantityChange(e){this.setState({qty:e.target.value})}handleSellButtonClick(){const e=this.getQuantity();if(isNaN(e))Object(f.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.sellStockShort(this.props.stock,e):this.props.sellStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:this.createPlaceOrderPopupBox("Place Sell Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.LimitSell,this.state.position)});break;case n.Stop:this.createPlaceOrderPopupBox("Place Sell Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.StopSell,this.state.position)})}}handleSellAllButtonClick(){const e=this.props.stock;switch(this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.sellStockShort(e,e.playerShortShares):this.props.sellStockLong(e,e.playerShares),this.props.rerenderAllTickers();break;default:Object(f.a)("ERROR: 'Sell All' only works for Market Orders")}}hasOrderAccess(){return 8===this.props.p.bitNodeN||h.a[8]>=3}hasShortAccess(){return 8===this.props.p.bitNodeN||h.a[8]>=2}render(){return r.createElement("li",null,r.createElement(d.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:m.a.Long},"Long"),this.hasShortAccess()&&r.createElement("option",{value:m.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(363),i=a(27),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(534);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(234);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__(89),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(539);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.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(159),r=a(44);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(17),r=a(262),i=a(44),o=a(5);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 ge})),a.d(t,"recordMoneySource",(function(){return fe})),a.d(t,"gainHackingExp",(function(){return ye})),a.d(t,"gainStrengthExp",(function(){return _e})),a.d(t,"gainDefenseExp",(function(){return be})),a.d(t,"gainDexterityExp",(function(){return Ee})),a.d(t,"gainAgilityExp",(function(){return ve})),a.d(t,"gainCharismaExp",(function(){return ke})),a.d(t,"gainIntelligenceExp",(function(){return Ce})),a.d(t,"queryStatFromString",(function(){return Oe})),a.d(t,"resetWorkStatus",(function(){return Se})),a.d(t,"processWorkEarnings",(function(){return we})),a.d(t,"startWork",(function(){return Te})),a.d(t,"cancelationPenalty",(function(){return Me})),a.d(t,"work",(function(){return xe})),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 De})),a.d(t,"startFocusing",(function(){return Ie})),a.d(t,"stopFocusing",(function(){return Ne})),a.d(t,"startFactionWork",(function(){return je})),a.d(t,"startFactionHackWork",(function(){return Le})),a.d(t,"startFactionFieldWork",(function(){return Be})),a.d(t,"startFactionSecurityWork",(function(){return Fe})),a.d(t,"workForFaction",(function(){return We})),a.d(t,"finishFactionWork",(function(){return Ue})),a.d(t,"getWorkMoneyGain",(function(){return Ge})),a.d(t,"getWorkHackExpGain",(function(){return He})),a.d(t,"getWorkStrExpGain",(function(){return Ke})),a.d(t,"getWorkDefExpGain",(function(){return qe})),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 Xe})),a.d(t,"finishCreateProgramWork",(function(){return Qe})),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 gt})),a.d(t,"applyForNetworkEngineerJob",(function(){return ft})),a.d(t,"applyForBusinessJob",(function(){return yt})),a.d(t,"applyForBusinessConsultantJob",(function(){return _t})),a.d(t,"applyForSecurityJob",(function(){return bt})),a.d(t,"applyForAgentJob",(function(){return Et})),a.d(t,"applyForEmployeeJob",(function(){return vt})),a.d(t,"applyForPartTimeEmployeeJob",(function(){return kt})),a.d(t,"applyForWaiterJob",(function(){return Ct})),a.d(t,"applyForPartTimeWaiterJob",(function(){return Ot})),a.d(t,"isQualified",(function(){return St})),a.d(t,"reapplyAllAugmentations",(function(){return wt})),a.d(t,"reapplyAllSourceFiles",(function(){return Tt})),a.d(t,"checkForFactionInvitations",(function(){return Mt})),a.d(t,"setBitNodeNumber",(function(){return xt})),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 Dt})),a.d(t,"canAccessResleeving",(function(){return It})),a.d(t,"giveExploit",(function(){return Nt})),a.d(t,"getIntelligenceBonus",(function(){return jt})),a.d(t,"getCasinoWinnings",(function(){return Lt}));var n=a(15),r=a(96),i=a(192),o=a(3),s=a(5),l=a(65),c=a(134),u=a(42),m=a(324),h=a(264),p=a(53),d=a(16),g=a(4),f=a(36),y=a(244),_=a(49),b=a(24),E=a(103),v=a(17),k=a(69),C=a(48),O=a(37),S=a(75),w=a(236),T=a(18),M=a(6),x=a(189),P=a(145),A=a(219),R=a(136),D=a(22),I=a(32),N=a(27),j=a(45),L=a(544),B=a(545),F=a(196),W=a(44),U=a(263),G=a(218),H=a(63),K=a(2),q=a(209),$=a(7),z=a(60),Y=a(11),V=a(64),J=a(10),X=a(120),Q=a(265),Z=a(0),ee=a.n(Z),te=a(31),ae=a.n(te);const ne=1e3/g.a.MilliPerCycle;function re(){var e=Object(I.h)({adminRights:!0,hostname:"home",ip:Object(D.c)(),isConnectedTo:!0,maxRam:8,organizationName:"Home PC",purchasedByPlayer:!0});this.homeComputer=e.ip,this.currentServer=e.ip,Object(D.a)(e),this.getHomeComputer().programs.push(f.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 H.a(1e3),this.city=T.a.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.resleeves=[];let t=Math.min(3,W.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.updateSkillLevels(),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 Oe(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 we(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 Te(e){this.resetWorkStatus(g.a.WorkTypeCompany,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=g.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=g.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)),b.Engine.loadWorkInProgressContent()}function Me(){const e=j.a[this.companyName];if(e){const t=D.b[e];if(t&&t.backdoorInstalled)return.75}return.5}function xe(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=g.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((g.a.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=g.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(U.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(X.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(Q.a)(this.workRepGainRate*ne),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.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),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.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,b.Engine.loadLocationContent(!1),t){var n="You worked a short shift of "+Object(Y.b)(this.timeWorked)+" and earned $"+K.a.formatMoney(this.workMoneyGained)+", "+K.a.formatReputation(this.workRepGained)+" reputation, "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" strength exp, "+K.a.formatExp(this.workDefExpGained)+" defense exp, "+K.a.formatExp(this.workDexExpGained)+" dexterity exp, "+K.a.formatExp(this.workAgiExpGained)+" agility exp, and "+K.a.formatExp(this.workChaExpGained)+" charisma exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function Ae(e){this.resetWorkStatus(g.a.WorkTypeCompanyPartTime,e),this.isWorking=!0,this.focus=!0,this.companyName=e,this.workType=g.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=g.a.MillisecondsPer8Hours;var t=Object(z.a)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",()=>(this.finishWorkPartTime(),!1)),b.Engine.loadWorkInProgressContent()}function Re(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=g.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((g.a.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=g.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(X.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(V.a)(K.a.formatExp(this.workRepGainRate*ne)+" / sec"),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.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 De(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),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.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,b.Engine.loadLocationContent(!1),e){var a="You worked for "+Object(Y.b)(this.timeWorked)+" and earned a total of $"+K.a.formatMoney(this.workMoneyGained)+", "+K.a.formatReputation(this.workRepGained)+" reputation, "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" strength exp, "+K.a.formatExp(this.workDefExpGained)+" defense exp, "+K.a.formatExp(this.workDexExpGained)+" dexterity exp, "+K.a.formatExp(this.workAgiExpGained)+" agility exp, and "+K.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),a}this.resetWorkStatus()}function Ie(){document.getElementById("mainmenu-container").style.visibility="hidden",this.focus=!0,b.Engine.loadWorkInProgressContent()}function Ne(){document.getElementById("mainmenu-container").style.visibility="visible",this.focus=!1,b.Engine.loadTerminalContent()}function je(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=g.a.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=g.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)),b.Engine.loadWorkInProgressContent()}function Le(e){this.resetWorkStatus(g.a.WorkTypeFaction,e.name,g.a.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=(this.hacking_skill+this.intelligence)/g.a.MaxSkillLevel*this.faction_rep_mult*this.getIntelligenceBonus(.5),this.factionWorkType=g.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)}function Be(e){this.resetWorkStatus(g.a.WorkTypeFaction,e.name,g.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=g.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)}function Fe(e){this.resetWorkStatus(g.a.WorkTypeFaction,e.name,g.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=g.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)}function We(e){const t=v.a[this.currentWorkFactionName];switch(this.factionWorkType){case g.a.FactionWorkHacking:this.workRepGainRate=Object(R.c)(this,t);break;case g.a.FactionWorkField:this.workRepGainRate=Object(R.a)(this,t);break;case g.a.FactionWorkSecurity:this.workRepGainRate=Object(R.b)(this,t)}var a=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=g.a.MillisecondsPer20Hours&&(a=!0,e=Math.round((g.a.MillisecondsPer20Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.processWorkEarnings(e),a||this.timeWorked>=g.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(X.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(Q.a)(this.workRepGainRate*ne),") reputation for this faction ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.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 Ue(e,t=!1){var a=v.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),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadFactionContent(),Object(k.a)(a.name),t){var n="You worked for your faction "+a.name+" for a total of "+Object(Y.b)(this.timeWorked)+". You earned "+K.a.formatReputation(this.workRepGained)+" rep, "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" str exp, "+K.a.formatExp(this.workDefExpGained)+" def exp, "+K.a.formatExp(this.workDexExpGained)+" dex exp, "+K.a.formatExp(this.workAgiExpGained)+" agi exp, and "+K.a.formatExp(this.workChaExpGained)+" cha exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function Ge(){let e=1;const t=u.a[this.companyName];W.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 He(){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 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 str exp gain will be 0"].join(" ")),0):a.strengthExpGain*e.expMultiplier*this.strength_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 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/g.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=g.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",b.Engine.loadWorkInProgressContent()}function Xe(e){var t=this.createProgramReqLvl,a=this.hacking_skill/t*this.getIntelligenceBonus(3);a=1+(a-1)/5,this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=b.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 Qe(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/g.a.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadTerminalContent(),this.resetWorkStatus()}function Ze(e,t,a){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=g.a.WorkTypeStudyClass,this.className=a;const n=1e3/b.Engine._idleSpeed;var r=0,i=0,o=0,l=0,c=0,u=0,m=0;const h=this.hashManager;switch(a){case g.a.ClassStudyComputerScience:i=g.a.ClassStudyComputerScienceBaseExp*t/n*h.getStudyMult();break;case g.a.ClassDataStructures:r=g.a.ClassDataStructuresBaseCost*e/n,i=g.a.ClassDataStructuresBaseExp*t/n*h.getStudyMult();break;case g.a.ClassNetworks:r=g.a.ClassNetworksBaseCost*e/n,i=g.a.ClassNetworksBaseExp*t/n*h.getStudyMult();break;case g.a.ClassAlgorithms:r=g.a.ClassAlgorithmsBaseCost*e/n,i=g.a.ClassAlgorithmsBaseExp*t/n*h.getStudyMult();break;case g.a.ClassManagement:r=g.a.ClassManagementBaseCost*e/n,m=g.a.ClassManagementBaseExp*t/n*h.getStudyMult();break;case g.a.ClassLeadership:r=g.a.ClassLeadershipBaseCost*e/n,m=g.a.ClassLeadershipBaseExp*t/n*h.getStudyMult();break;case g.a.ClassGymStrength:r=g.a.ClassGymBaseCost*e/n,o=t/n*h.getTrainingMult();break;case g.a.ClassGymDefense:r=g.a.ClassGymBaseCost*e/n,l=t/n*h.getTrainingMult();break;case g.a.ClassGymDexterity:r=g.a.ClassGymBaseCost*e/n,c=t/n*h.getTrainingMult();break;case g.a.ClassGymAgility:r=g.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==g.a.ClassGymStrength||a==g.a.ClassGymDefense||a==g.a.ClassGymDexterity||a==g.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",b.Engine.loadWorkInProgressContent()}function et(e){this.timeWorked+=b.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(X.a)(this.workMoneyLossRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have gained: ",ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.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(g.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),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var t="After "+this.className+" for "+Object(Y.b)(this.timeWorked)+", you spent a total of "+K.a.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" strength exp, "+K.a.formatExp(this.workDefExpGained)+" defense exp, "+K.a.formatExp(this.workDexExpGained)+" dexterity exp, "+K.a.formatExp(this.workAgiExpGained)+" agility exp, and "+K.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=g.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",b.Engine.loadWorkInProgressContent()}function nt(e){if(this.timeWorked+=b.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 _.a)if(_.a[t].type==this.crimeType){e=_.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 "+K.a.formatMoney(this.workMoneyGained)+", "+K.a.formatExp(this.workHackExpGained)+" hack exp, "+K.a.formatExp(this.workStrExpGained)+" str exp, "+K.a.formatExp(this.workDefExpGained)+" def exp, "+K.a.formatExp(this.workDexExpGained)+" dex exp, "+K.a.formatExp(this.workAgiExpGained)+" agi exp, "+K.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),K.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.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 "+K.a.formatExp(this.workHackExpGained)+" hack exp, "+K.a.formatExp(this.workStrExpGained)+" str exp, "+K.a.formatExp(this.workDefExpGained)+" def exp, "+K.a.formatExp(this.workDexExpGained)+" dex exp, "+K.a.formatExp(this.workAgiExpGained)+" agi exp, "+K.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),K.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.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(),b.Engine.loadLocationContent(!1)}function it(){if(!this.isWorking)return"";var e;switch(this.workType){case g.a.WorkTypeStudyClass:e=this.finishClass(!0);break;case g.a.WorkTypeCompany:e=this.finishWork(!0,!0);break;case g.a.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case g.a.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case g.a.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0);break;case g.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(G.b)(this);return!1===N.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,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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 gt(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 ft(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 _t(e=!1){return this.applyForJob(p.a[d.c[0]],e)}function bt(e=!1){return this.applyForJob(p.a[d.h[2]],e)}function Et(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 vt(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],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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 kt(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],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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 Ot(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],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),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 wt(e=!0){e&&this.resetMultipliers();for(let e=0;et}var i=v.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=v.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=v.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=v.a.ECorp;c.isBanned||c.isMember||c.alreadyInvited||!r(M.a.AevumECorp)||e.push(c);var m=v.a.MegaCorp;m.isBanned||m.isMember||m.alreadyInvited||!r(M.a.Sector12MegaCorp)||e.push(m);var h=v.a["Bachman & Associates"];h.isBanned||h.isMember||h.alreadyInvited||!r(M.a.AevumBachmanAndAssociates)||e.push(h);var p=v.a["Blade Industries"];p.isBanned||p.isMember||p.alreadyInvited||!r(M.a.Sector12BladeIndustries)||e.push(p);var d=v.a.NWO;d.isBanned||d.isMember||d.alreadyInvited||!r(M.a.VolhavenNWO)||e.push(d);var f=v.a["Clarke Incorporated"];f.isBanned||f.isMember||f.alreadyInvited||!r(M.a.AevumClarkeIncorporated)||e.push(f);var y=v.a["OmniTek Incorporated"];y.isBanned||y.isMember||y.alreadyInvited||!r(M.a.VolhavenOmniTekIncorporated)||e.push(y);var _=v.a["Four Sigma"];_.isBanned||_.isMember||_.alreadyInvited||!r(M.a.Sector12FourSigma)||e.push(_);var b=v.a["KuaiGong International"];b.isBanned||b.isMember||b.alreadyInvited||!r(M.a.ChongqingKuaiGongInternational)||e.push(b);var E=v.a["Fulcrum Secret Technologies"],k=D.b[j.a[j.b.FulcrumSecretTechnologies]];null==k?console.error("Could not find Fulcrum Secret Technologies Server"):E.isBanned||E.isMember||E.alreadyInvited||!k.backdoorInstalled||!r(M.a.AevumFulcrumTechnologies,25e4)||e.push(E);var C=v.a.BitRunners,S=(this.getHomeComputer(),D.b[j.a[j.b.BitRunnersServer]]);null==S?console.error("Could not find BitRunners Server"):C.isBanned||C.isMember||!S.backdoorInstalled||C.alreadyInvited||e.push(C);var w=v.a["The Black Hand"],x=D.b[j.a[j.b.TheBlackHandServer]];null==x?console.error("Could not find The Black Hand Server"):w.isBanned||w.isMember||!x.backdoorInstalled||w.alreadyInvited||e.push(w);var P=v.a.NiteSec,A=D.b[j.a[j.b.NiteSecServer]];null==A?console.error("Could not find NiteSec Server"):P.isBanned||P.isMember||!A.backdoorInstalled||P.alreadyInvited||e.push(P);var R=v.a.Chongqing;R.isBanned||R.isMember||R.alreadyInvited||!this.money.gte(2e7)||this.city!=T.a.Chongqing||e.push(R);var I=v.a["Sector-12"];I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(15e6)||this.city!=T.a.Sector12||e.push(I);var N=v.a["New Tokyo"];N.isBanned||N.isMember||N.alreadyInvited||!this.money.gte(2e7)||this.city!=T.a.NewTokyo||e.push(N);var L=v.a.Aevum;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(4e7)||this.city!=T.a.Aevum||e.push(L);var B=v.a.Ishima;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(3e7)||this.city!=T.a.Ishima||e.push(B);var F=v.a.Volhaven;F.isBanned||F.isMember||F.alreadyInvited||!this.money.gte(5e7)||this.city!=T.a.Volhaven||e.push(F);var W=v.a["Speakers for the Dead"];!W.isBanned&&!W.isMember&&!W.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(M.a.Sector12CIA)&&!a.includes(M.a.Sector12NSA)&&e.push(W);var U=v.a["The Dark Army"];!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==T.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!a.includes(M.a.Sector12CIA)&&!a.includes(M.a.Sector12NSA)&&e.push(U);var G=v.a["The Syndicate"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==T.a.Aevum||this.city==T.a.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&!a.includes(M.a.Sector12CIA)&&!a.includes(M.a.Sector12NSA)&&e.push(G);var H=v.a.Silhouette;!H.isBanned&&!H.isMember&&!H.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(H);var K=v.a.Tetrads;!K.isBanned&&!K.isMember&&!K.alreadyInvited&&(this.city==T.a.Chongqing||this.city==T.a.NewTokyo||this.city==T.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(K);var q=v.a["Slum Snakes"];!q.isBanned&&!q.isMember&&!q.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(q);var $=v.a.Netburners,z=0,Y=0,V=0;for(let e=0;e=80&&z>=8&&Y>=4&&V>=100&&e.push($);var J=v.a["Tian Di Hui"];J.isBanned||J.isMember||J.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=T.a.Chongqing&&this.city!=T.a.NewTokyo&&this.city!=T.a.Ishima||e.push(J);var X=v.a.CyberSec,Q=D.b[j.a[j.b.CyberSecServer]];return null==Q?console.error("Could not find CyberSec Server"):X.isBanned||X.isMember||!Q.backdoorInstalled||X.alreadyInvited||e.push(X),e}function xt(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||!(v.a[e.name]instanceof E.a))return e.type=l.c.FactionReputationAll,this.gainCodingContractReward(e);var a=g.a.CodingContractBaseFactionRepGain*t;return v.a[e.name].playerReputation+=a,`Gained ${a} faction reputation for ${e.name}`;case l.c.FactionReputationAll:const i=g.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)v.a[e]instanceof E.a&&(v.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=g.a.CodingContractBaseCompanyRepGain*t;return u.a[e.name].playerReputation+=a,`Gained ${a} company reputation for ${e.name}`;case l.c.Money:default:var r=g.a.CodingContractBaseMoneyGain*t*s.a.CodingContractMoney;return this.gainMoney(r),this.recordMoneySource(r,"codingcontract"),"Gained "+K.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 Dt(e){return null==w.a[e]?(console.warn("Player.gotoLocation() called with invalid location: "+e),!1):(this.location=e,!0)}function It(){return 10===this.bitNodeN||W.a[10]>0}function Nt(e){this.exploits.includes(e)||this.exploits.push(e)}function jt(e){return Object(A.a)(this.intelligence,e)}function Lt(){return this.moneySourceA.casino}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(18),r=a(6),i=a(38);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(196),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;ae.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(102);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(164),o=a(102);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(15);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(15),i=a(3),o=a(1),s=a(303);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;ai.a.startFocusing(),id:"character-overview-options-button",className:"character-overview-btn"},"Focus"))));return r.a.createElement(r.a.Fragment,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",{id:"character-hp-wrapper"},r.a.createElement("td",{className:"character-hp-cell"},"HP:"),r.a.createElement("td",{id:"character-hp-text",className:"character-hp-cell character-stat-cell"},o.a.formatHp(i.a.hp)+" / "+o.a.formatHp(i.a.max_hp))),r.a.createElement("tr",{id:"character-money-wrapper"},r.a.createElement("td",{className:"character-money-cell"},"Money: "),r.a.createElement("td",{id:"character-money-text",className:"character-money-cell character-stat-cell"},o.a.formatMoney(i.a.money.toNumber()))),r.a.createElement("tr",{id:"character-hack-wrapper"},r.a.createElement("td",{className:"character-hack-cell"},"Hack: "),r.a.createElement("td",{id:"character-hack-text",className:"character-hack-cell character-stat-cell"},o.a.formatSkill(i.a.hacking_skill))),r.a.createElement("tr",{id:"character-str-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-combat-cell"},"Str: "),r.a.createElement("td",{id:"character-str-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.strength))),r.a.createElement("tr",{id:"character-def-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Def: "),r.a.createElement("td",{id:"character-def-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.defense))),r.a.createElement("tr",{id:"character-dex-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Dex: "),r.a.createElement("td",{id:"character-dex-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.dexterity))),r.a.createElement("tr",{id:"character-agi-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Agi: "),r.a.createElement("td",{id:"character-agi-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.agility))),r.a.createElement("tr",{id:"character-cha-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-cha-cell"},"Cha: "),r.a.createElement("td",{id:"character-cha-text",className:"character-cha-cell character-stat-cell"},o.a.formatSkill(i.a.charisma))),i.a.intelligence>=1&&e,i.a.isWorking&&!i.a.focus&&t)))}}},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(69);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(31),i=a(557),o=a(20);let s;function l(e,t,a){o.b.isOn(o.a.Gang)&&r.render(n.createElement(i.a,{engine:e,gang:t,player:a}),s)}document.addEventListener("DOMContentLoaded",(function e(){const t=document.getElementById("gang-container");if(null===t)throw new Error("Could not find element 'gang-container'");s=t,document.removeEventListener("DOMContentLoaded",e)}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(558),o=a(571),s=a(69);function l(e){const[t,a]=Object(n.useState)(!0),l=Object(n.useState)(!1)[1];return Object(n.useEffect)(()=>{const e=setInterval(()=>l(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,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(559),o=a(561);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(17),o=a(11),s=a(2),l=a(120),c=a(64),u=a(48),m=a(560);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(4),i=a(11);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(562),o=a(563),s=a(21),l=a(569);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 h}));var n=a(0),r=a.n(n),i=a(11),o=a(2),s=a(147),l=a(10),c=a(21),u=a(126);function m(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),m=a(e.member.upgrades,u.a.Vehicle),h=a(e.member.upgrades,u.a.Rootkit),p=a(e.member.augmentations,u.a.Augmentation);function d(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 f=e.member.calculateAscensionMult(e.member.hack_asc_points),y=e.member.calculateAscensionMult(e.member.str_asc_points),_=e.member.calculateAscensionMult(e.member.def_asc_points),b=e.member.calculateAscensionMult(e.member.dex_asc_points),E=e.member.calculateAscensionMult(e.member.agi_asc_points),v=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*f,2),")",r.a.createElement("br",null),"Str: ",e.member.str," (x",Object(i.c)(e.member.str_mult*y,2),")",r.a.createElement("br",null),"Def: ",e.member.def," (x",Object(i.c)(e.member.def_mult*_,2),")",r.a.createElement("br",null),"Dex: ",e.member.dex," (x",Object(i.c)(e.member.dex_mult*b,2),")",r.a.createElement("br",null),"Agi: ",e.member.agi," (x",Object(i.c)(e.member.agi_mult*E,2),")",r.a.createElement("br",null),"Cha: ",e.member.cha," (x",Object(i.c)(e.member.cha_mult*v,2),")"),r.a.createElement("div",{className:"gang-owned-upgrades-div noselect"},"Purchased Upgrades:"," ",e.member.upgrades.map(e=>d(e)),e.member.augmentations.map(e=>d(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("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Armor"),c.map(e=>g(e))),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Vehicles"),m.map(e=>g(e))),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Rootkits"),h.map(e=>g(e,!0))),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Augmentations"),p.map(e=>g(e,!0))))}function h(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(m,{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(102),o=a(564);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(565),o=a(567),s=a(568);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(7),o=a(11),s=a(2),l=a(21),c=a(566);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(21),s=a(7);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(132),s=a(120);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(122);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(570),o=a(170),s=a(11),l=a(21);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(21),o=a(7);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!")}function l(){Object(i.b)(e.popupId)}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(),27===e.keyCode&&l()},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"),r.a.createElement("a",{className:"std-button",onClick:l},"Cancel"))}},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(7),s=a(11),l=a(48);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 l}));var n=a(0),r=a.n(n),i=a(573),o=a(575),s=a(576);function l(e){return r.a.createElement("div",{id:"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 g}));var n=a(0),r=a.n(n),i=a(11),o=a(39),s=a(10),l=a(132),c=a(2),u=a(7),m=a(21),h=a(17),p=a(69),d=a(574);function g(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(21),o=a(39);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."),o.a.CityNames.map(t=>r.a.createElement("div",{key:t,className:"cmpy-mgmt-find-employee-option",onClick:()=>function(t){e.bladeburner.city=t,Object(i.b)(e.popupId)}(t)},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(577),o=a(580),s=a(583),l=a(586),c=a(589),u=a(158);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(578);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(579),o=a(150);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(26),o=a(130),s=a(11),l=a(95);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(581);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(582);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(26),o=a(130),s=a(11),l=a(158),c=a(39),u=a(237),m=a(95);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,g=e.action.getActionTime(e.bladeburner),f=`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*g),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:f},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:f,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(584);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(585);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(26),o=a(130),s=a(11),l=a(158),c=a(39),u=a(21),m=a(304),h=a(237),p=a(95);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),g=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),f=e.action.level>=e.action.maxLevel,y=e.action.getActionTime(e.bladeburner),_=`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)(g,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:g/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 "+(f?"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:_},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:_,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(587);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(149),o=a(588);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(11),o=a(26),s=a(130),l=a(158),c=a(21),u=a(304),m=a(237),h=a(95);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),g=e.bladeburner.rank>=e.action.reqdRank,f=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)(f,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:f/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:g?"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:g?"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(590),o=a(39),s=a(11);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(591),i=a(137);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(95),o=a(11);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.skillPoints3?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(594),o=a(624);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(19),o=a(62);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 _}));var n,r=a(0),i=a.n(r),o=a(62),s=a(625),l=a(626),c=a(627),u=a(628),m=a(629),h=a(630),p=a(631),d=a(632),g=a(633),f=a(634);!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,g.a];function _(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 g(){p({lastGames:[h.lastGames[1],h.id],id:d()})}function _(e){m(t=>{let a=t;return a+=e?"✓":"✗",a.length>15&&(a=a.slice(1)),a})}let b;switch(l){case n.Countdown:b=i.a.createElement(s.a,{onFinish:()=>c(n.Minigame)});break;case n.Minigame:{const r=y[h.id];b=i.a.createElement(r,{onSuccess:function(){_(!0),t===e.MaxLevel?c(n.Sell):(c(n.Countdown),a(t+1)),g()},onFailure:function(t){c(n.Countdown),_(!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()}g()},difficulty:e.Difficulty+t/50});break}case n.Sell:b=i.a.createElement(f.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},b)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(62);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(62),o=a(109),s=a(110),l=a(141),c=a(111),u=a(308);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(62),o=a(109),s=a(110),l=a(111);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(62),o=a(109),s=a(110),l=a(141),c=a(111),u=a(308);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,g]=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():g(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(62),o=a(109),s=a(110),l=a(111);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(62),o=a(109),s=a(110),l=a(141),c=a(111);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(62),o=a(109),s=a(110),l=a(111),c=a(141);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==f[0]&&t==f[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=[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,y(n),32==t.keyCode){if(m[f[1]][f[0]]!==p[d])return void e.onFailure();g(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(62),o=a(109),s=a(110),l=a(111),c=a(141);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(()=>_(!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==g[0]&&t==g[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=[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,f(n),32==t.keyCode){if(!m[g[1]][g[0]])return void e.onFailure();d(t=>(t[g[1]][g[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,_.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 g(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,a)=>t===a}}function f(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(17),r=a(0),i=a.n(r),o=a(19),s=a(62),l=a(10),c=a(64),u=a(5);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 o}));var n=a(0),r=a(27),i=a(19);class o extends n.Component{asciiCity(){const e=e=>e?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 b}));var n=a(0),r=a(637),i=a(638),o=a(639),s=a(640),l=a(641),c=a(642),u=a(646),m=a(647),h=a(648),p=a(38),d=a(27),g=a(45),f=a(32),y=a(19),_=a(668);class b 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=g.a.getIp(this.props.loc.name),a=Object(f.b)(t),r=null!==a&&Object(f.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(_.a,{content:this.props.loc.name}):this.props.loc.name),e)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(163),i=a(236),o=a(42),s=a(194),l=a(53),c=a(16),u=a(19),m=a(64),h=a(243),p=a(47);function d(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 f extends n.Component{constructor(e){if(super(e),d(this,"companyPosition",null),d(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;const t=Object(p.d)(),a=Object(p.c)();null!=t&&null!=a&&(t.innerHTML="Quit job",a.innerHTML="Cancel",t.addEventListener("click",()=>{this.props.p.quitJob(this.props.locName),this.checkIfEmployedHere(!0),Object(p.a)()}),a.addEventListener("click",()=>{Object(p.a)()}),Object(p.b)(n.createElement(n.Fragment,null,"Would you like to quit your job at ",this.company.name,"?")))}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"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(4),i=a(32),o=a(45),s=a(19),l=a(10);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(218),i=a(108),o=a(10),s=a(7);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(49),i=a(2),o=a(108);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),g=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(g)} chance of success)`,tooltip:"Attempt to pull off the ultimate heist"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(188),i=a(6),o=a(108),s=a(19),l=a(7);class c 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(){Object(r.b)(this.props.p)}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(l.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(l.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(s.a,{onClick:this.handleBladeburner,style:this.btnStyle,text:e})}renderNoodleBar(){return n.createElement(s.a,{onClick:function(){Object(l.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(o.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(s.a,{onClick:this.handleResleeving,style:this.btnStyle,text:"Re-Sleeve"}):null}render(){switch(this.props.loc.name){case i.a.NewTokyoVitaLife:return this.renderResleeving();case i.a.Sector12CityHall:return this.renderCreateCorporation();case i.a.Sector12NSA:return this.renderBladeburner();case i.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 m}));var n=a(0),r=a(188),i=a(643),o=a(644),s=a(645),l=a(114),c=a(19),u=a(10);function m(e){const t={display:"block"},a=[];for(let i=e.loc.techVendorMinRam;i<=e.loc.techVendorMaxRam;i*=2){const o=Object(l.a)(i);a.push(n.createElement(c.a,{key:i,onClick:()=>Object(r.a)(i,e.p),style:t,text:n.createElement(n.Fragment,null,"Purchase ",i,"GB Server - ",n.createElement(u.a,{money:o,player:e.p})),disabled:!e.p.canAfford(o)}))}return n.createElement("div",null,a,n.createElement("br",null),n.createElement("p",{className:"noselect"},n.createElement("i",null,'"You can order bigger servers via scripts. We don\'t take custom order in person."')),n.createElement("br",null),n.createElement(o.a,{p:e.p}),n.createElement(i.a,{p:e.p}),n.createElement(s.a,{p:e.p}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(4),o=a(114),s=a(166),l=a(19),c=a(10),u=a(165);function m(e){const t=Object(n.useState)(!1)[1];const a={display:"block"},m=e.p.getHomeComputer();if(m.maxRam>=i.a.HomeComputerMaxRam)return r.a.createElement(s.a,{style:a,text:"Upgrade 'home' RAM - MAX"});const h=e.p.getUpgradeHomeRamCost();return r.a.createElement(l.a,{disabled:!e.p.canAfford(h),onClick:function(){Object(o.d)(e.p),t(e=>!e)},style:a,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' RAM (",m.maxRam,"GB ->"," ",2*m.maxRam,"GB) - ",r.a.createElement(c.a,{money:h,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(188),o=a(4),s=a(166),l=a(19),c=a(10);function u(e){const t=Object(n.useState)(!1)[1];const a={display:"block"};return e.p.hasTorRouter()?r.a.createElement(s.a,{style:a,text:"TOR Router - Purchased"}):r.a.createElement(l.a,{disabled:!e.p.canAfford(o.a.TorRouterCost),onClick:function(){Object(i.d)(e.p),t(e=>!e)},style:a,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 c}));var n=a(0),r=a.n(n),i=a(166),o=a(19),s=a(10),l=a(165);function c(e){const t=Object(n.useState)(!1)[1];const a={display:"block"},c=e.p.getHomeComputer(),u=c.cpuCores>=8;if(u)return r.a.createElement(i.a,{style:a,text:"Upgrade 'home' cores - MAX"});const m=1e9*Math.pow(7.5,c.cpuCores);return r.a.createElement(o.a,{disabled:!e.p.canAfford(m),onClick:function(){u||e.p.canAfford(m)&&(e.p.loseMoney(m),c.cpuCores++,t(e=>!e))},style:a,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' cores (",c.cpuCores," ->"," ",c.cpuCores+1,") - ",r.a.createElement(s.a,{money:m,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(18),i=a(188),o=a(4),s=a(27),l=a(19),c=a(10);class u extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"}}asciiWorldMap(){const e=e=>e.city!==this.props.p.city?n.createElement("span",{className:"tooltip",style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px"},onClick:i.c.bind(null,e.city,this.props.travel)},n.createElement("span",{className:"tooltiptext"},e.city),n.createElement("b",null,e.city[0])):n.createElement("span",null,e.city[0]);return n.createElement("div",{className:"noselect"},n.createElement("p",null,"From here, you can travel to any other city! A ticket costs"," ",n.createElement(c.a,{money:o.a.TravelCost,player:this.props.p}),"."),n.createElement("pre",null," ,_ . ._. _. ."),n.createElement("pre",null," , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-"),n.createElement("pre",null," /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_"),n.createElement("pre",null," / ,/'-/~ '\\ ,' _ , '",n.createElement(e,{city:"Volhaven"}),",'|~ ._/-, /~"),n.createElement("pre",null," ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~"),n.createElement("pre",null,".-~ '| '',\\~|\\ _\\~ ,_ , ",n.createElement(e,{city:"Chongqing"})," /,"),n.createElement("pre",null," '\\ ",n.createElement(e,{city:"Sector-12"})," /'~ |_/~\\\\,-,~ \\ \" ,_,/ |"),n.createElement("pre",null," | / ._-~'\\_ _~| \\ ) ",n.createElement(e,{city:"New Tokyo"})),n.createElement("pre",null," \\ __-\\ '/ ~ |\\ \\_ / ~"),n.createElement("pre",null," ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,"),n.createElement("pre",null," ~-_' _; '\\ '-, \\,' /\\/ |"),n.createElement("pre",null," '\\_,~'\\_ \\_ _, /' ' |, /|'"),n.createElement("pre",null," / \\_ ~ | / \\ ~'; -,_."),n.createElement("pre",null," | ~\\ | | , '-_, ,; ~ ~\\"),n.createElement("pre",null," \\, ",n.createElement(e,{city:"Aevum"})," / \\ / /| ,-, , -,"),n.createElement("pre",null," | ,/ | |' |/ ,- ~ \\ '."),n.createElement("pre",null," ,| ,/ \\ ,/ \\ ",n.createElement(e,{city:"Ishima"})," |"),n.createElement("pre",null," / | ~ -~~-, / _"),n.createElement("pre",null," | ,-' ~ /"),n.createElement("pre",null," / ,' ~"),n.createElement("pre",null," ',| ~"),n.createElement("pre",null," ~'"))}listWorldMap(){const e=[];for(const t in r.a){const a=r.a[t];a!==this.props.p.city&&e.push(n.createElement(l.a,{key:a,onClick:i.c.bind(null,a,this.props.travel),style:this.btnStyle,text:"Travel to "+a}))}return n.createElement("div",null,n.createElement("p",null,"From here, you can travel to any other city! A ticket costs"," ",n.createElement(c.a,{money:o.a.TravelCost}),"."),e)}render(){return s.a.DisableASCIIArt?this.listWorldMap():this.asciiWorldMap()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(4),i=a(32),o=a(45),s=a(19),l=a(10);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(649),o=a(665),s=a(666),l=a(667),c=a(19);!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 g}));var n=a(0),r=a(10),i=a(201),o=a(650),s=a(276),l=a(991),c=a(367),u=a(652),m=a(335),h=a(370);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 g 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: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:g}=this.state,f=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:g}))),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): "),f.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(138),r=a(651);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(o.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(19),i=a(197),o=a(201),s=a(50);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(19),i=a(10),o=a(201),s=a(197),l=a(50);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(19),i=a(10),o=a(197),s=a(201),l=a(50);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(19),o=a(670),s=a(21),l=a(683),c=a(684),u=a(76),m=a(7),h=a(221),p=a(83),d=a(204),g=a(167),f=a(292),y=a(169),_=a(2),b=a(372),E=a(373),v=a(261),k=a(27),C=a(58);let O=[];!function(){const e=Object(v.a)({});O=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"];O=O.filter(e=>!t.includes(e))}();let S="",w="",T=null;function M(e){const t=Object(n.useRef)(null),[a,v]=Object(n.useState)(e.filename?e.filename:S),[M,x]=Object(n.useState)(e.code?e.code:w),[P,A]=Object(n.useState)("RAM: ???"),[R,D]=Object(n.useState)({theme:k.a.MonacoTheme,insertSpaces:k.a.MonacoInsertSpaces});function I(){if(null!==t.current){const e=t.current.getPosition();null!==e&&b.a.saveCursor(a,{row:e.lineNumber,column:e.column})}if(T=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==M.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: "+_.a.formatRAM(a))}return Object(n.useEffect)(()=>{""!==e.filename&&(S=e.filename,w=e.code,T=null)},[]),Object(n.useEffect)(()=>{const e=setInterval(N,1e3);return()=>clearInterval(e)},[M]),Object(n.useEffect)(()=>{function e(e){k.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",{id:"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,v(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=>{D(e),k.a.MonacoTheme=e.theme,k.a.MonacoInsertSpaces=e.insertSpaces}})}})),r.a.createElement(o.a,{beforeMount:function(e){e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const a of O)t.push({label:a,kind:e.languages.CompletionItemKind.Function,insertText:a,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(E.a,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(E.a,"netscript.d.ts")},onMount:function(e){if(t.current=e,null===t.current)return;const n=b.a.getCursor(a);-1!==n.row?t.current.setPosition({lineNumber:n.row,column:n.column}):null!==T&&t.current.setPosition({lineNumber:T.lineNumber,column:T.column+1}),t.current.focus()},loading:r.a.createElement("p",null,"Loading script editor!"),height:"80%",defaultLanguage:"javascript",defaultValue:M,onChange:function(e){void 0!==e&&(w=e,null!==t.current&&(T=t.current.getPosition()),x(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)(M,{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(19),o=a(21);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 c}));var n=a(20),r=a(686),i=a(1),o=a(0),s=a(31);let l=null;function c(){n.b.isOn(n.a.Milestones)&&l instanceof HTMLElement&&s.render(o.createElement(r.a,{player:i.a}),l)}document.addEventListener("DOMContentLoaded",(function e(){l=document.getElementById("milestones-container"),document.removeEventListener("DOMContentLoaded",e)}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(374),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(r.Fragment,null,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 d}));var n=a(0),r=a.n(n),i=a(301),o=a(15),s=a(10),l=a(7),c=a(30),u=a(154),m=a(240),h=a(79),p=a(143);function d(e,t){const a=e.augmentations.map(e=>e.name),n=Object(i.a)(e,t),g="purchase-sleeve-augs-popup",f=[Object(m.a)(g,{innerText:"Cancel"}),Object(c.a)("p",{display:"block",innerHTML:"Owned Augmentations:"})],y=Object(c.a)("div",{width:"70%"});for(const e of a){const t=o.a[e];if(null==t){console.warn("Invalid Augmentation: "+e);continue}let a=t.info;"string"!=typeof a&&(a=Object(p.renderToStaticMarkup)(a)),a+="

",a+=Object(p.renderToStaticMarkup)(t.stats),y.appendChild(Object(c.a)("div",{class:"gang-owned-upgrade",innerText:e,tooltip:a}))}f.push(y);const _=Object(c.a)("p",{innerHTML:["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.

","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."].join(" ")});f.push(_);for(const a of n){const n=Object(c.a)("div",{class:"cmpy-mgmt-upgrade-div"});let i=a.info;"string"!=typeof i&&(i=Object(p.renderToStaticMarkup)(i)),i+="

",i+=Object(p.renderToStaticMarkup)(a.stats),n.appendChild(Object(c.a)("p",{fontSize:"12px",innerHTML:[`

${a.name}


`,`Cost: ${Object(p.renderToStaticMarkup)(r.a.createElement(s.a,{money:a.startingCost,player:t}))}

`,""+i].join(" "),padding:"2px",clickListener:()=>{e.tryBuyAugmentation(t,a)?(Object(l.a)(`Installed ${a.name} on Duplicate Sleeve!`,!1),Object(h.a)(g),d(e,t)):Object(l.a)("You cannot afford "+a.name,!1)}})),f.push(n)}Object(u.a)(g,f)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);const r=n.createElement(n.Fragment,null,n.createElement("strong",null,n.createElement("u",null,"How do Duplicate Sleeves work?")),n.createElement("br",null),"Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience, and reputation.",n.createElement("br",null),n.createElement("br",null),"Sleeves are their own individuals, which means they each have their own experience and stats.",n.createElement("br",null),n.createElement("br",null),"When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well as all of the player's other sleeves.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"What is Synchronization (Sync)?")),n.createElement("br",null),"Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing a task.",n.createElement("br",null),n.createElement("br",null),"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve and the player's original host consciousness earn N% of the amount of experience normally earned by the task. All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.",n.createElement("br",null),n.createElement("br",null),"Synchronization can be increased by assigning sleeves to the 'Synchronize' task.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"What is Shock?")),n.createElement("br",null),"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the amount of experience earned by the sleeve.",n.createElement("br",null),n.createElement("br",null),"Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning sleeves to the 'Shock Recovery' task.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"Why can't I work for this company or faction?")),n.createElement("br",null),"Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two sleeves they can work for two different companies, but they cannot both work for the same company.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"Why did my Sleeve stop working?")),n.createElement("br",null),"Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a company after 8 hours, and stop working for a faction after 20 hours.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"How do I buy Augmentations for my Sleeves?")),n.createElement("br",null),"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"Why can't I buy the X Augmentation for my sleeve?")),n.createElement("br",null),"Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor, are not available for sleeves.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"Do sleeves get reset when installing Augmentations or switching BitNodes?")),n.createElement("br",null),"Sleeves are reset when switching BitNodes, but not when installing Augmentations.",n.createElement("br",null),n.createElement("br",null),n.createElement("strong",null,n.createElement("u",null,"What is Memory?")),n.createElement("br",null),"Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be set to 25, rather than 1.",n.createElement("br",null),n.createElement("br",null),"Memory can only be increased by purchasing upgrades from The Covenant. It is a persistent stat, meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.")},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.hp)," /"," ",n.a.formatHp(e.max_hp))),r.createElement("tr",null,r.createElement("td",null,"City: "),r.createElement("td",{style:t},e.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.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.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.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.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.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.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.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.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.memory))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(2),r=a(132),i=a(0);function o(e){return i.createElement(i.Fragment,null,Object(r.a)([["Hacking: ",e.hacking_skill,`(${n.a.formatExp(e.hacking_exp)} exp)`],["Strength: ",e.strength,`(${n.a.formatExp(e.strength_exp)} exp)`],["Defense: ",e.defense,`(${n.a.formatExp(e.defense_exp)} exp)`],["Dexterity: ",e.dexterity,`(${n.a.formatExp(e.dexterity_exp)} exp)`],["Agility: ",e.agility,`(${n.a.formatExp(e.agility_exp)} exp)`],["Charisma: ",e.charisma,`(${n.a.formatExp(e.charisma_exp)} exp)`]],"Stats:"),i.createElement("br",null),Object(r.a)([["Hacking Level multiplier: ",n.a.formatPercentage(e.hacking_mult)],["Hacking Experience multiplier: ",n.a.formatPercentage(e.hacking_exp_mult)],["Strength Level multiplier: ",n.a.formatPercentage(e.strength_mult)],["Strength Experience multiplier: ",n.a.formatPercentage(e.strength_exp_mult)],["Defense Level multiplier: ",n.a.formatPercentage(e.defense_mult)],["Defense Experience multiplier: ",n.a.formatPercentage(e.defense_exp_mult)],["Dexterity Level multiplier: ",n.a.formatPercentage(e.dexterity_mult)],["Dexterity Experience multiplier: ",n.a.formatPercentage(e.dexterity_exp_mult)],["Agility Level multiplier: ",n.a.formatPercentage(e.agility_mult)],["Agility Experience multiplier: ",n.a.formatPercentage(e.agility_exp_mult)],["Charisma Level multiplier: ",n.a.formatPercentage(e.charisma_mult)],["Charisma Experience multiplier: ",n.a.formatPercentage(e.charisma_exp_mult)],["Faction Reputation Gain multiplier: ",n.a.formatPercentage(e.faction_rep_mult)],["Company Reputation Gain multiplier: ",n.a.formatPercentage(e.company_rep_mult)],["Salary multiplier: ",n.a.formatPercentage(e.work_money_mult)],["Crime Money multiplier: ",n.a.formatPercentage(e.crime_money_mult)],["Crime Success multiplier: ",n.a.formatPercentage(e.crime_success_mult)]],"Multipliers:"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(2),r=a(10),i=a(0),o=a(132);function s(e){return i.createElement(i.Fragment,null,Object(o.a)([["Money ",i.createElement(r.a,{money:e.earningsForTask.money})],["Hacking Exp ",n.a.formatExp(e.earningsForTask.hack)],["Strength Exp ",n.a.formatExp(e.earningsForTask.str)],["Defense Exp ",n.a.formatExp(e.earningsForTask.def)],["Dexterity Exp ",n.a.formatExp(e.earningsForTask.dex)],["Agility Exp ",n.a.formatExp(e.earningsForTask.agi)],["Charisma Exp ",n.a.formatExp(e.earningsForTask.cha)]],"Earnings for Current Task:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.earningsForPlayer.money})],["Hacking Exp: ",n.a.formatExp(e.earningsForPlayer.hack)],["Strength Exp: ",n.a.formatExp(e.earningsForPlayer.str)],["Defense Exp: ",n.a.formatExp(e.earningsForPlayer.def)],["Dexterity Exp: ",n.a.formatExp(e.earningsForPlayer.dex)],["Agility Exp: ",n.a.formatExp(e.earningsForPlayer.agi)],["Charisma Exp: ",n.a.formatExp(e.earningsForPlayer.cha)]],"Total Earnings for Host Consciousness:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.earningsForSleeves.money})],["Hacking Exp: ",n.a.formatExp(e.earningsForSleeves.hack)],["Strength Exp: ",n.a.formatExp(e.earningsForSleeves.str)],["Defense Exp: ",n.a.formatExp(e.earningsForSleeves.def)],["Dexterity Exp: ",n.a.formatExp(e.earningsForSleeves.dex)],["Agility Exp: ",n.a.formatExp(e.earningsForSleeves.agi)],["Charisma Exp: ",n.a.formatExp(e.earningsForSleeves.cha)]],"Total Earnings for Other Sleeves:"),i.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(117),r=a(15),i=a(12);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;en.createElement("tr",{key:e[0]},n.createElement("td",{key:"0"},e[0]+" multiplier:"),n.createElement("td",{key:"1",style:{textAlign:"right",paddingLeft:"5px"}},r.a.formatPercentage(e[1])),function(e){return c.a[5]>0&&e.length>2&&e[1]!=e[2]?n.createElement("td",{key:"2",style:{textAlign:"right"}}," ","(",r.a.formatPercentage(e[2]),")"):n.createElement(n.Fragment,null)}(e))))))}const d=[["Time played since last Augmentation:",Object(s.b)(e.playtimeSinceLastAug)]];return e.sourceFiles.length>0&&d.push(["Time played since last Bitnode destroyed:",Object(s.b)(e.playtimeSinceLastBitnode)]),d.push(["Total Time played:",Object(s.b)(e.totalPlaytime)]),n.createElement("pre",null,n.createElement("b",null,"General"),n.createElement("br",null),n.createElement("br",null),n.createElement("span",null,"Current City: ",e.city),n.createElement("br",null),n.createElement((function(){return e.companyName?n.createElement(n.Fragment,null,n.createElement("span",null,"Employer at which you last worked: ",e.companyName),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null),n.createElement((function(){return""!==e.companyName?n.createElement(n.Fragment,null,n.createElement("span",null,"Job you last worked: ",e.jobs[e.companyName]),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null),n.createElement((function(){return e.jobs&&0!==Object.keys(e.jobs).length?n.createElement(n.Fragment,null,n.createElement("span",null,"All Employers:"),n.createElement("br",null),n.createElement("ul",null,Object.keys(e.jobs).map(e=>n.createElement("li",{key:e}," * ",e))),n.createElement("br",null),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null),n.createElement("span",null,"Money: ",n.createElement(p.a,{money:e.money.toNumber()})),n.createElement("button",{className:"popup-box-button",style:{display:"inline-block",float:"none"},onClick:function(){let a=n.createElement(n.Fragment,null,n.createElement("u",null,"Money earned since you last installed Augmentations:"),n.createElement("br",null),t(e.moneySourceA));0!==e.sourceFiles.length&&(a=n.createElement(n.Fragment,null,a,n.createElement("br",null),n.createElement("br",null),n.createElement("u",null,"Money earned in this BitNode:"),n.createElement("br",null),t(e.moneySourceB))),Object(o.a)(a,!1)}},"Money Statistics & Breakdown"),n.createElement("br",null),n.createElement("br",null),n.createElement("b",null,"Stats"),n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",{key:"0"},n.createElement("td",{key:"0"},"Hacking:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.hacking_skill)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.hacking_exp)," exp)")),n.createElement("tr",{key:"1"},n.createElement("td",{key:"0"},"Strength:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.strength)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.strength_exp)," exp)")),n.createElement("tr",{key:"2"},n.createElement("td",{key:"0"},"Defense:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.defense)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.defense_exp)," exp)")),n.createElement("tr",{key:"3"},n.createElement("td",{key:"0"},"Dexterity:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.dexterity)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.dexterity_exp)," exp)")),n.createElement("tr",{key:"4"},n.createElement("td",{key:"0"},"Agility:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.agility)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.agility_exp)," exp)")),n.createElement("tr",{key:"5"},n.createElement("td",{key:"0"},"Charisma:"),n.createElement("td",{key:"1",style:{textAlign:"right"}},r.a.formatSkill(e.charisma)),n.createElement("td",{key:"2",style:{textAlign:"right"}},"(",r.a.formatExp(e.charisma_exp)," exp)")),n.createElement((function(){return e.intelligence>0&&(5===e.bitNodeN||c.a[5]>0)?n.createElement("tr",{key:"5"},n.createElement("td",null,"Intelligence:"),n.createElement("td",{style:{textAlign:"right"}},r.a.formatSkill(e.intelligence))):n.createElement(n.Fragment,null)}),null))),n.createElement("br",null),n.createElement(a,{rows:[["Hacking Chance",e.hacking_chance_mult],["Hacking Speed",e.hacking_speed_mult],["Hacking Money",e.hacking_money_mult,e.hacking_money_mult*l.a.ScriptHackMoney],["Hacking Growth",e.hacking_grow_mult,e.hacking_grow_mult*l.a.ServerGrowthRate]]}),n.createElement("br",null),n.createElement(a,{rows:[["Hacking Level",e.hacking_mult,e.hacking_mult*l.a.HackingLevelMultiplier],["Hacking Experience",e.hacking_exp_mult,e.hacking_exp_mult*l.a.HackExpGain]]}),n.createElement("br",null),n.createElement(a,{rows:[["Strength Level",e.strength_mult,e.strength_mult*l.a.StrengthLevelMultiplier],["Strength Experience",e.strength_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Defense Level",e.defense_mult,e.defense_mult*l.a.DefenseLevelMultiplier],["Defense Experience",e.defense_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Dexterity Level",e.dexterity_mult,e.dexterity_mult*l.a.DexterityLevelMultiplier],["Dexterity Experience",e.dexterity_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Agility Level",e.agility_mult,e.agility_mult*l.a.AgilityLevelMultiplier],["Agility Experience",e.agility_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Charisma Level",e.charisma_mult,e.charisma_mult*l.a.CharismaLevelMultiplier],["Charisma Experience",e.charisma_exp_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Hacknet Node production",e.hacknet_node_money_mult,e.hacknet_node_money_mult*l.a.HacknetNodeMoney],["Hacknet Node purchase cost",e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.hacknet_node_level_cost_mult]]}),n.createElement("br",null),n.createElement(a,{rows:[["Company reputation gain",e.company_rep_mult],["Faction reputation gain",e.faction_rep_mult,e.faction_rep_mult*l.a.FactionWorkRepGain],["Salary",e.work_money_mult,e.work_money_mult*l.a.CompanyWorkMoney]]}),n.createElement("br",null),n.createElement(a,{rows:[["Crime success",e.crime_success_mult],["Crime money",e.crime_money_mult,e.crime_money_mult*l.a.CrimeMoney]]}),n.createElement("br",null),n.createElement((function(){return e.canAccessBladeburner()?n.createElement(n.Fragment,null,n.createElement(a,{rows:[["Bladeburner Success Chance",e.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.bladeburner_success_chance_mult]]}),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null),n.createElement("br",null),n.createElement("b",null,"Misc."),n.createElement("br",null),n.createElement("br",null),n.createElement("span",null,`Servers owned: ${e.purchasedServers.length} / ${Object(u.b)()}`),n.createElement("br",null),n.createElement((function(){return 9===e.bitNodeN||c.a[9]>0?n.createElement(n.Fragment,null,n.createElement("span",null,`Hacknet Servers owned: ${e.hacknetNodes.length} / ${m.b.MaxServers}`),n.createElement("br",null)):n.createElement(n.Fragment,null,n.createElement("span",null,"Hacknet Nodes owned: "+e.hacknetNodes.length),n.createElement("br",null))}),null),n.createElement("span",null,"Augmentations installed: "+e.augmentations.length),n.createElement("br",null),n.createElement("br",null),Object(h.a)(d),n.createElement("br",null),n.createElement((function(){if(e.sourceFiles.length>0){const t="BitNode"+e.bitNodeN;return n.createElement(n.Fragment,null,n.createElement("span",null,"Current BitNode: ",e.bitNodeN," (",i.a[t].name,")"),n.createElement("br",null),n.createElement("br",null),n.createElement("div",{style:{width:"60%",fontSize:"13px",marginLeft:"4%"}},i.a[t].info.split("
").map((e,t)=>n.createElement("div",{key:t},n.createElement("span",{style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},e),n.createElement("br",null)))))}return n.createElement(n.Fragment,null)}),null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(24),r=a(27),i=a(2);function o(){function e(e){0===r.a.AutosaveInterval?e.innerHTML="disabled":e.innerHTML=`every ${r.a.AutosaveInterval}s`}const t=document.getElementById("settingsNSExecTimeRangeValLabel"),a=document.getElementById("settingsNSLogRangeValLabel"),o=document.getElementById("settingsNSPortRangeValLabel"),s=document.getElementById("settingsSuppressMessages"),l=document.getElementById("settingsSuppressFactionInvites"),c=document.getElementById("settingsSuppressTravelConfirmation"),u=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),m=document.getElementById("settingsSuppressHospitalizationPopup"),h=document.getElementById("settingsSuppressBladeburnerPopup"),p=document.getElementById("settingsAutosaveIntervalValLabel"),d=document.getElementById("settingsDisableHotkeys"),g=document.getElementById("settingsDisableASCIIArt"),f=document.getElementById("settingsDisableTextEffects"),y=document.getElementById("settingsLocale");t.innerHTML=r.a.CodeInstructionRunTime+"ms",a.innerHTML=r.a.MaxLogCapacity,o.innerHTML=r.a.MaxPortCapacity,s.checked=r.a.SuppressMessages,l.checked=r.a.SuppressFactionInvites,c.checked=r.a.SuppressTravelConfirmation,u.checked=r.a.SuppressBuyAugmentationConfirmation,m.checked=r.a.SuppressHospitalizationPopup,h.checked=r.a.SuppressBladeburnerPopup,e(p),d.checked=r.a.DisableHotkeys,g.checked=r.a.CityListView,f.checked=r.a.DisableTextEffects,y.value=r.a.Locale,i.a.updateLocale(r.a.Locale);const _=document.getElementById("settingsNSExecTimeRangeVal"),b=document.getElementById("settingsNSLogRangeVal"),E=document.getElementById("settingsNSPortRangeVal"),v=document.getElementById("settingsAutosaveIntervalVal");_.value=r.a.CodeInstructionRunTime,b.value=r.a.MaxLogCapacity,E.value=r.a.MaxPortCapacity,v.value=r.a.AutosaveInterval,_.oninput=function(){t.innerHTML=this.value+"ms",r.a.CodeInstructionRunTime=this.value},b.oninput=function(){a.innerHTML=this.value,r.a.MaxLogCapacity=this.value},E.oninput=function(){o.innerHTML=this.value,r.a.MaxPortCapacity=this.value},v.oninput=function(){r.a.AutosaveInterval=Number(this.value),e(p),0===Number(this.value)?n.Engine.Counters.autoSaveCounter=1/0:n.Engine.Counters.autoSaveCounter=5*Number(this.value)},s.onclick=function(){r.a.SuppressMessages=this.checked},l.onclick=function(){r.a.SuppressFactionInvites=this.checked},c.onclick=function(){r.a.SuppressTravelConfirmation=this.checked},u.onclick=function(){r.a.SuppressBuyAugmentationConfirmation=this.checked},m.onclick=function(){r.a.SuppressHospitalizationPopup=this.checked},h.onclick=function(){r.a.SuppressBladeburnerPopup=this.checked},d.onclick=function(){r.a.DisableHotkeys=this.checked},g.onclick=function(){r.a.DisableASCIIArt=this.checked},f.onclick=function(){r.a.DisableTextEffects=this.checked},y.onchange=function(){if(!i.a.updateLocale(y.value)){console.warn("Invalid locale for numeral: "+y.value);let e="en";return r.a.Locale=e,void(y.value=e)}r.a.Locale=y.value}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(10);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(697),i=a(157),o=a(32);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(102),i=a(698),o=a(130);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(379),o=a(210);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";a.d(t,"a",(function(){return o}));var n=a(33);const r={Hacking:null,Character:null,World:null,Help:null};function i(e,t,a){for(let a=0;a0?"list-item":"none",this.classList.toggle("opened");const c=[t,r,o,s,l],u=[n.a.Stats,n.a.Factions,n.a.Augmentations,n.a.HacknetNodes,n.a.Sleeves];t.style.maxHeight?i(!1,c,u):i(!0,c,u)},r.World.onclick=function(){const t=a("city-tab"),r=a("travel-tab"),o=a("job-tab"),s=a("stock-market-tab"),l=a("bladeburner-tab"),c=a("corporation-tab"),u=a("gang-tab");o.style.display=""!==e.companyName?"list-item":"none",s.style.display=e.hasWseAccount?"list-item":"none",l.style.display=e.inBladeburner()?"list-item":"none",c.style.display=e.hasCorporation()?"list-item":"none",u.style.display=e.inGang()?"list-item":"none",this.classList.toggle("opened");const m=[t,r,o,s,l,c,u],h=[n.a.City,n.a.Travel,n.a.Job,n.a.StockMarket,n.a.Bladeburner,n.a.Corporation,n.a.Gang];t.style.maxHeight?i(!1,m,h):i(!0,m,h)},r.Help.onclick=function(){const e=a("milestones-tab"),r=a("tutorial-tab"),o=a("options-tab");this.classList.toggle("opened");const s=[e,r,o],l=[n.a.Milestones,n.a.Tutorial,n.a.Options];t&&(s.push(a("dev-tab")),l.push(a("dev-menu-link"))),r.style.maxHeight?i(!1,s,l):i(!0,s,l)},!0}catch(e){return console.error("Failed to initialize Main Menu Headers: "+e),!1}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(22),o=a(102),s=a(2);function l(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(o.a,{headerContent:r.a.createElement(r.a.Fragment,null,t.hostname," (",s.a.formatBigNumber(a),"b)"),panelContent:r.a.createElement("ul",null,n.map(e=>r.a.createElement("li",{key:e.name},e.name,": ",s.a.formatBigNumber(e.size),"b")))})}function c(){const e=[];for(const t of Object.keys(i.b))e.push(t);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",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."),e.map(e=>r.a.createElement(l,{key:e,ip:e})))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";var n=a(1),r=a(164);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(164);!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/Bladeburner/ui/AllPages.tsx b/src/Bladeburner/ui/AllPages.tsx index 0dafb959e..479d2d841 100644 --- a/src/Bladeburner/ui/AllPages.tsx +++ b/src/Bladeburner/ui/AllPages.tsx @@ -28,8 +28,8 @@ export function AllPages(props: IProps): React.ReactElement { onClick={() => setPage(props.name)} className={ page !== props.name - ? "bladeburner-nav-button" - : "bladeburner-nav-button-inactive" + ? "bladeburner-nav-button noselect" + : "bladeburner-nav-button-inactive noselect" } > {props.name}