Files
lifeRestart/public/chunk/544.67736.js
Vick Scarlet 915a2aa17d new build
2021-12-02 18:34:29 +08:00

1 line
36 KiB
JavaScript

"use strict";(self.webpackChunklife_restart=self.webpackChunklife_restart||[]).push([[544],{5544:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (/* binding */ CyberProperty)\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1249);\n/* harmony import */ var core_js_modules_es_array_fill_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3290);\n/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1058);\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8309);\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2526);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1817);\n/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6992);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1539);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8783);\n/* harmony import */ var core_js_modules_es_weak_map_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(4129);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(3948);\n/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8304);\n/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(489);\n/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2419);\n/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2165);\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }\n\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }\n\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }\n\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }\n\nvar _types = /*#__PURE__*/new WeakMap();\n\nvar _propertyPoints = /*#__PURE__*/new WeakMap();\n\nvar _propertyAllocate = /*#__PURE__*/new WeakMap();\n\nvar _propertyAllocateLimit = /*#__PURE__*/new WeakMap();\n\nvar CyberProperty = /*#__PURE__*/function (_ui$view$CyberTheme$C) {\n _inherits(CyberProperty, _ui$view$CyberTheme$C);\n\n var _super = _createSuper(CyberProperty);\n\n function CyberProperty() {\n var _this;\n\n _classCallCheck(this, CyberProperty);\n\n _this = _super.call(this);\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _types, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _propertyPoints, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _propertyAllocate, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _propertyAllocateLimit, {\n writable: true,\n value: void 0\n });\n\n var types = _classPrivateFieldSet(_assertThisInitialized(_this), _types, core.PropertyTypes);\n\n _this.btnCharmIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.CHR, 1]);\n\n _this.btnCharmReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.CHR, -1]);\n\n _this.btnIntelligenceIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.INT, 1]);\n\n _this.btnIntelligenceReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.INT, -1]);\n\n _this.btnStrengthIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.STR, 1]);\n\n _this.btnStrengthReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.STR, -1]);\n\n _this.btnMoneyIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.MNY, 1]);\n\n _this.btnMoneyReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.MNY, -1]);\n\n _this.inputCharm.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.CHR]);\n\n _this.inputIntelligence.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.INT]);\n\n _this.inputStrength.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.STR]);\n\n _this.inputMoney.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.MNY]);\n\n var selectAll = function selectAll(_ref) {\n var item = _ref.currentTarget;\n item.text = \'\';\n };\n\n _this.inputCharm.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.inputIntelligence.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.inputStrength.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.inputMoney.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.btnRandomAllocate.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.random);\n\n _this.btnNext.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.next);\n\n _this.listSelectedTalents.renderHandler = Laya.Handler.create(_assertThisInitialized(_this), _this.renderTalent, null, false);\n return _this;\n }\n\n _createClass(CyberProperty, [{\n key: "init",\n value: function init(_ref2) {\n var _classPrivateFieldSet2;\n\n var talents = _ref2.talents;\n this.listSelectedTalents.array = talents;\n var talentIds = talents.map(function (talent) {\n return talent.id;\n }); // core.talentReplace(talentIds);\n\n _classPrivateFieldSet(this, _propertyPoints, core.getPropertyPoints(talentIds));\n\n _classPrivateFieldSet(this, _propertyAllocateLimit, core.propertyAllocateLimit);\n\n this.labLeftPropertyPoint.text = _classPrivateFieldGet(this, _propertyPoints);\n\n _classPrivateFieldSet(this, _propertyAllocate, (_classPrivateFieldSet2 = {}, _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).CHR, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).INT, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).STR, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).MNY, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).TLT, talentIds), _classPrivateFieldSet2));\n\n this.updateAllocate();\n }\n }, {\n key: "next",\n value: function next() {\n var left = _classPrivateFieldGet(this, _propertyPoints) - this.total;\n\n if (left > 0) {\n return $$event(\'message\', [\'F_PropertyPointLeft\', left]);\n }\n\n $ui.switchView(UI.pages.TRAJECTORY, {\n propertyAllocate: _classPrivateFieldGet(this, _propertyAllocate),\n talents: this.listSelectedTalents.array\n });\n }\n }, {\n key: "total",\n get: function get() {\n return _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).CHR] + _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).INT] + _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).STR] + _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).MNY];\n }\n }, {\n key: "updateAllocate",\n value: function updateAllocate() {\n var charm = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).CHR];\n\n var intelligence = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).INT];\n\n var strength = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).STR];\n\n var money = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).MNY];\n\n this.inputCharm.text = \'\' + charm;\n this.inputIntelligence.text = \'\' + intelligence;\n this.inputStrength.text = \'\' + strength;\n this.inputMoney.text = \'\' + money;\n this.labLeftPropertyPoint.text = _classPrivateFieldGet(this, _propertyPoints) - this.total;\n this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = false;\n this.btnCharmReduce.disabled = this.btnCharmReduce.gray = false;\n this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = false;\n this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = false;\n this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = false;\n this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = false;\n this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = false;\n this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = false;\n\n if (this.total >= _classPrivateFieldGet(this, _propertyPoints)) {\n this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = true;\n this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = true;\n this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = true;\n this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = true;\n } else if (this.total <= 0) {\n this.btnCharmReduce.disabled = this.btnCharmReduce.gray = true;\n this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = true;\n this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = true;\n this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = true;\n }\n\n if (charm <= _classPrivateFieldGet(this, _propertyAllocateLimit)[0]) {\n this.btnCharmReduce.disabled = this.btnCharmReduce.gray = true;\n } else if (charm >= _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) {\n this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = true;\n }\n\n if (intelligence <= _classPrivateFieldGet(this, _propertyAllocateLimit)[0]) {\n this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = true;\n } else if (intelligence >= _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) {\n this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = true;\n }\n\n if (strength <= _classPrivateFieldGet(this, _propertyAllocateLimit)[0]) {\n this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = true;\n } else if (strength >= _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) {\n this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = true;\n }\n\n if (money <= _classPrivateFieldGet(this, _propertyAllocateLimit)[0]) {\n this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = true;\n } else if (money >= _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) {\n this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = true;\n }\n }\n }, {\n key: "check",\n value: function check(left, right, value) {\n if (value < left) return false;\n if (value > right) return false;\n return true;\n }\n }, {\n key: "random",\n value: function random() {\n var t = _classPrivateFieldGet(this, _propertyPoints);\n\n var arr = new Array(4).fill(_classPrivateFieldGet(this, _propertyAllocateLimit)[1]);\n\n while (t > 0) {\n var sub = Math.round(Math.random() * (Math.min(t, _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) - 1)) + 1;\n\n while (true) {\n var select = Math.floor(Math.random() * 4) % 4;\n if (arr[select] - sub < 0) continue;\n arr[select] -= sub;\n t -= sub;\n break;\n }\n }\n\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).CHR] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[0];\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).INT] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[1];\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).STR] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[2];\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).MNY] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[3];\n this.updateAllocate();\n }\n }, {\n key: "onPropertyAllocate",\n value: function onPropertyAllocate(type, value) {\n if (!this.check(_classPrivateFieldGet(this, _propertyAllocateLimit)[0], _classPrivateFieldGet(this, _propertyAllocateLimit)[1], _classPrivateFieldGet(this, _propertyAllocate)[type] + value)) {\n return;\n }\n\n if (!this.check(0, _classPrivateFieldGet(this, _propertyPoints), this.total + value)) {\n return;\n }\n\n _classPrivateFieldGet(this, _propertyAllocate)[type] += value;\n this.updateAllocate();\n }\n }, {\n key: "onPropertyAllocateInput",\n value: function onPropertyAllocateInput(type, inputItem) {\n var value = parseInt(inputItem.text) || 0;\n var total = this.total;\n\n if (total + value < 0) {\n value = _classPrivateFieldGet(this, _propertyAllocateLimit)[0] * 4 - total;\n } else if (total + value > _classPrivateFieldGet(this, _propertyPoints)) {\n value = _classPrivateFieldGet(this, _propertyPoints) - total;\n }\n\n if (value < _classPrivateFieldGet(this, _propertyAllocateLimit)[0]) {\n value = _classPrivateFieldGet(this, _propertyAllocateLimit)[0];\n } else if (value > _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) {\n value = _classPrivateFieldGet(this, _propertyAllocateLimit)[1];\n }\n\n var alter = value - _classPrivateFieldGet(this, _propertyAllocate)[type];\n\n if (alter) {\n this.onPropertyAllocate(type, alter);\n } else {\n this.updateAllocate();\n }\n }\n }, {\n key: "renderTalent",\n value: function renderTalent(box) {\n var dataSource = box.dataSource;\n var labTitle = box.getChildByName("labTitle");\n var grade1 = box.getChildByName("grade1");\n var grade2 = box.getChildByName("grade2");\n var grade3 = box.getChildByName("grade3");\n var labDescription = box.getChildByName("labDescription");\n labTitle.text = dataSource.name;\n labDescription.text = dataSource.description;\n\n switch (dataSource.grade) {\n case 1:\n grade1.visible = true;\n grade2.visible = false;\n grade3.visible = false;\n break;\n\n case 2:\n grade1.visible = false;\n grade2.visible = true;\n grade3.visible = false;\n break;\n\n case 3:\n grade1.visible = false;\n grade2.visible = false;\n grade3.visible = true;\n break;\n\n default:\n grade1.visible = false;\n grade2.visible = false;\n grade3.visible = false;\n break;\n }\n }\n }]);\n\n return CyberProperty;\n}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gICAgICBzd2l0Y2ggKGRhdGFTb3VyY2UuZ3JhZGUpIHtcclxuICAgICAgICAgICAgY2FzZSAxOlxyXG4gICAgICAgICAgICAgICAgZ3JhZGUxLnZpc2libGUgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgZ3JhZGUyLnZpc2libGUgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIGdyYWRlMy52aXNpYmxlID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSAyOlxyXG4gICAgICAgICAgICAgICAgZ3JhZGUxLnZpc2libGUgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIGdyYWRlMi52aXNpYmxlID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIGdyYWRlMy52aXNpYmxlID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSAzOlxyXG4gICAgICAgICAgICAgICAgZ3JhZGUxLnZpc2libGUgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIGdyYWRlMi52aXNpYmxlID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICBncmFkZTMudmlzaWJsZSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgICAgIGdyYWRlMS52aXNpYmxlID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICBncmFkZTIudmlzaWJsZSA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgZ3JhZGUzLnZpc2libGUgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufSJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///5544\n')}}]);